Skip to content

Commit cdb935c

Browse files
committed
Merge branch 'main' of https://github.com/github/docs-internal into find-page-in-version-redux
2 parents d9b1fa9 + 7b31c08 commit cdb935c

13 files changed

Lines changed: 355 additions & 100 deletions

File tree

content/actions/index.md

Lines changed: 17 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -60,105 +60,26 @@ versions:
6060
<!-- {% link_with_intro /reference %} -->
6161

6262
<!-- Code examples -->
63+
{% assign actionsCodeExamples = site.data.variables.action_code_examples %}
64+
{% if actionsCodeExamples %}
6365
<div class="my-6 pt-6">
6466
<h2 class="mb-2 font-mktg h1">Code examples</h2>
6567

68+
<div class="pr-lg-3 mb-5 mt-3">
69+
<input class="js-code-example-filter input-lg py-2 px-3 col-12 col-lg-8 form-control" placeholder="Search code examples" type="text" autocomplete="off" />
70+
</div>
71+
6672
<div class="d-flex flex-wrap gutter">
67-
<div class="col-12 col-lg-4 mb-4">
68-
<a class="Box d-block hover-grow no-underline text-gray-dark" href="/actions/guides/building-and-testing-nodejs">
69-
<div class="p-4">
70-
<h4>Building and testing Node.js</h4>
71-
<p class="mt-2 mb-4">Use GitHub Actions to power CI in your Node.js application.</p>
72-
<div class="d-flex">
73-
<span class="IssueLabel text-white bg-blue mr-2">JavaScript/TypeScript</span>
74-
<span class="IssueLabel text-white bg-blue mr-2">CI</span>
75-
</div>
76-
</div>
77-
<footer class="border-top p-4 text-gray d-flex flex-items-center">
78-
{% octicon "workflow" class="flex-shrink-0" %}
79-
<span class="ml-2">/guides/building-and-testing-nodejs</span>
80-
</footer>
81-
</a>
82-
</div>
83-
<div class="col-12 col-lg-4 mb-4">
84-
<a class="Box d-block hover-grow no-underline text-gray-dark" href="/actions/guides/building-and-testing-python">
85-
<div class="p-4">
86-
<h4>Building and testing Python</h4>
87-
<p class="mt-2 mb-4">Use GitHub Actions to power CI in your Python application.</p>
88-
<div class="d-flex">
89-
<span class="IssueLabel text-white bg-blue mr-2">Python</span>
90-
<span class="IssueLabel text-white bg-blue mr-2">CI</span>
91-
</div>
92-
</div>
93-
<footer class="border-top p-4 text-gray d-flex flex-items-center">
94-
{% octicon "workflow" class="flex-shrink-0" %}
95-
<span class="ml-2">/guides/building-and-testing-python</span>
96-
</footer>
97-
</a>
98-
</div>
99-
<div class="col-12 col-lg-4 mb-4">
100-
<a class="Box d-block hover-grow no-underline text-gray-dark" href="/actions/guides/building-and-testing-java-with-maven">
101-
<div class="p-4">
102-
<h4>Building and testing Java with Maven</h4>
103-
<p class="mt-2 mb-4">Use GitHub Actions to power CI in your Java project with Maven.</p>
104-
<div class="d-flex">
105-
<span class="IssueLabel text-white bg-blue mr-2">Java</span>
106-
<span class="IssueLabel text-white bg-blue mr-2">CI</span>
107-
</div>
108-
</div>
109-
<footer class="border-top p-4 text-gray d-flex flex-items-center">
110-
{% octicon "workflow" class="flex-shrink-0" %}
111-
<span class="ml-2">/guides/building-and-testing-java-with-maven</span>
112-
</footer>
113-
</a>
114-
</div>
115-
<div class="col-12 col-lg-4 mb-4">
116-
<a class="Box d-block hover-grow no-underline text-gray-dark" href="/actions/guides/building-and-testing-java-with-gradle">
117-
<div class="p-4">
118-
<h4>Building and testing Java with Gradle</h4>
119-
<p class="mt-2 mb-4">Use GitHub Actions to power CI in your Java project with Gradle.</p>
120-
<div class="d-flex">
121-
<span class="IssueLabel text-white bg-blue mr-2">Java</span>
122-
<span class="IssueLabel text-white bg-blue mr-2">CI</span>
123-
</div>
124-
</div>
125-
<footer class="border-top p-4 text-gray d-flex flex-items-center">
126-
{% octicon "workflow" class="flex-shrink-0" %}
127-
<span class="ml-2">/guides/building-and-testing-java-with-gradle</span>
128-
</footer>
129-
</a>
130-
</div>
131-
<div class="col-12 col-lg-4 mb-4">
132-
<a class="Box d-block hover-grow no-underline text-gray-dark" href="/actions/guides/building-and-testing-java-with-ant">
133-
<div class="p-4">
134-
<h4>Building and testing Java with Ant</h4>
135-
<p class="mt-2 mb-4">Use GitHub Actions to power CI in your Java project with Ant.</p>
136-
<div class="d-flex">
137-
<span class="IssueLabel text-white bg-blue mr-2">Java</span>
138-
<span class="IssueLabel text-white bg-blue mr-2">CI</span>
139-
</div>
140-
</div>
141-
<footer class="border-top p-4 text-gray d-flex flex-items-center">
142-
{% octicon "workflow" class="flex-shrink-0" %}
143-
<span class="ml-2">/guides/building-and-testing-java-with-ant</span>
144-
</footer>
145-
</a>
146-
</div>
147-
<div class="col-12 col-lg-4 mb-4">
148-
<a class="Box d-block hover-grow no-underline text-gray-dark" href="/actions/guides/publishing-nodejs-packages">
149-
<div class="p-4">
150-
<h4>Publishing Node.js packages</h4>
151-
<p class="mt-2 mb-4">Use GitHub Actions to push your Node.js package to GitHub Packages or npm.</p>
152-
<div class="d-flex">
153-
<span class="IssueLabel text-white bg-blue mr-2">JavaScript/TypeScript</span>
154-
<span class="IssueLabel text-white bg-blue mr-2">CI</span>
155-
</div>
156-
</div>
157-
<footer class="border-top p-4 text-gray d-flex flex-items-center">
158-
{% octicon "workflow" class="flex-shrink-0" %}
159-
<span class="ml-2">/guides/publishing-nodejs-packages</span>
160-
</footer>
161-
</a>
162-
</div>
73+
{% render 'code-example-card' for actionsCodeExamples as example %}
74+
</div>
75+
76+
<button class="js-code-example-show-more btn btn-outline float-right">Show more {% octicon "arrow-right" %}</button>
77+
78+
<div class="js-code-example-no-results d-none py-4 text-center text-gray font-mktg">
79+
<div class="mb-3">{% octicon "search" width="24" %}</div>
80+
<h3 class="text-normal">Sorry, there is no result for <strong class="js-code-example-filter-value"></strong></h3>
81+
<p class="my-3 f4">It looks like we don't have an example that fits your filter.<br>Try another filter or add your code example</p>
82+
<a href="https://github.com/github/docs/blob/HEAD/data/variables/action_code_examples.yml">Learn how to add a code example {% octicon "arrow-right" %}</a>
16383
</div>
16484
</div>
85+
{% endif %}

content/github/writing-on-github/autolinked-references-and-urls.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ References to a commit's SHA hash are automatically converted into shortened lin
4343

4444
| Reference type | Raw reference | Short link |
4545
| --- | --- | --- |
46-
| Commit URL | https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e | [a5c3785](https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e) |
46+
| Commit URL | [`https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e`](https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e) | [a5c3785](https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e) |
4747
| SHA | a5c3785ed8d6a35868bc169f07e40e889087fd2e | [a5c3785](https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e) |
4848
| User@SHA | jlord@a5c3785ed8d6a35868bc169f07e40e889087fd2e | [jlord@a5c3785](https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e)
49-
| Username/Repository@SHA | jlord/sheetsee.js@a5c3785ed8d6a35868bc169f07e40e889087fd2e | [jlord/sheetsee.js@a5c3785](https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e) |
49+
| `Username/Repository@SHA` | `jlord/sheetsee.js@a5c3785ed8d6a35868bc169f07e40e889087fd2e` | [`jlord/sheetsee.js@a5c3785`](https://github.com/jlord/sheetsee.js/commit/a5c3785ed8d6a35868bc169f07e40e889087fd2e) |
5050

5151
### Custom autolinks to external resources
5252

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
- title: Starter workflows
2+
description: Workflow files for helping people get started with GitHub Actions
3+
languages: TypeScript
4+
href: actions/starter-workflows
5+
tags:
6+
- official
7+
- workflows
8+
- title: Example services
9+
description: Example workflows using service containers
10+
languages: JavaScript
11+
href: actions/example-services
12+
tags:
13+
- service containers
14+
- title: Declaratively setup GitHub Labels
15+
description: GitHub Action to declaratively setup labels across repos
16+
languages: JavaScript
17+
href: lannonbr/issue-label-manager-action
18+
tags:
19+
- issues
20+
- labels
21+
- title: Declaratively sync GitHub lables
22+
description: GitHub Action to sync GitHub labels in the declarative way
23+
languages: 'Go, Dockerfile'
24+
href: micnncim/action-label-syncer
25+
tags:
26+
- issues
27+
- labels
28+
- title: Add releases to GitHub
29+
description: Publish Github releases in an action
30+
languages: 'Dockerfile, Shell'
31+
href: elgohr/Github-Release-Action
32+
tags:
33+
- releases
34+
- publishing
35+
- title: Publish a docker image to Dockerhub
36+
description: A Github Action used to build and publish Docker images
37+
languages: 'Dockerfile, Shell'
38+
href: elgohr/Publish-Docker-Github-Action
39+
tags:
40+
- docker
41+
- publishing
42+
- build
43+
- title: Create an issue using content from a file
44+
description: A GitHub action to create an issue using content from a file
45+
languages: 'JavaScript, Python'
46+
href: peter-evans/create-issue-from-file
47+
tags:
48+
- issues
49+
- title: Publish GitHub Releases with Assets
50+
description: GitHub Action for creating GitHub Releases
51+
languages: 'TypeScript, Shell, JavaScript'
52+
href: softprops/action-gh-release
53+
tags:
54+
- releases
55+
- publishing
56+
- title: GitHub Project Automation+
57+
description: Automate GitHub Project cards with any webhook event.
58+
languages: JavaScript
59+
href: alex-page/github-project-automation-plus
60+
tags:
61+
- projects
62+
- automation
63+
- issues
64+
- pull requests
65+
- title: Run GitHub Actions Locally with a web interface
66+
description: Runs GitHub Actions workflows locally (local)
67+
languages: 'JavaScript, HTML, Dockerfile, CSS'
68+
href: phishy/wflow
69+
tags:
70+
- local-development
71+
- devops
72+
- docker
73+
- title: Run your GitHub Actions locally
74+
description: Run GitHub Actions Locally in Terminal
75+
languages: 'Go, Shell'
76+
href: nektos/act
77+
tags:
78+
- local-development
79+
- devops
80+
- docker
81+
- title: Build and Publish Android debug APK
82+
description: Build and release debug APK from your Android project
83+
languages: 'Shell, Dockerfile'
84+
href: ShaunLWM/action-release-debugapk
85+
tags:
86+
- android
87+
- build
88+
- title: Generate sequential build numbers for GitHub Actions
89+
description: GitHub action for generating sequential build numbers.
90+
languages: JavaScript
91+
href: einaregilsson/build-number
92+
tags:
93+
- build
94+
- automation
95+
- title: GitHub actions to push back to repository
96+
description: Push Git changes to GitHub repository without authentication difficulties
97+
languages: 'JavaScript, Shell'
98+
href: ad-m/github-push-action
99+
tags:
100+
- publishing
101+
- title: Generate release notes based on your events
102+
description: Action to auto generate a release note based on your events
103+
languages: 'Shell, Dockerfile'
104+
href: Decathlon/release-notes-generator-action
105+
tags:
106+
- releases
107+
- publishing
108+
- title: Create a GitHub wiki page based on the provided markdown file
109+
description: Create a GitHub wiki page based on the provided markdown file
110+
languages: 'Shell, Dockerfile'
111+
href: Decathlon/wiki-page-creator-action
112+
tags:
113+
- wiki
114+
- publishing
115+
- title: Label your Pull Requests auto-magically (using committed files)
116+
description: >-
117+
Github action to label your pull requests auto-magically (using committed
118+
files)
119+
languages: 'TypeScript, Dockerfile, JavaScript'
120+
href: Decathlon/pull-request-labeler-action
121+
tags:
122+
- projects
123+
- issues
124+
- labels
125+
- title: Add Label to your Pull Requests based on the author team name
126+
description: Github action to label your pull requests based on the author name
127+
languages: 'TypeScript, JavaScript'
128+
href: JulienKode/team-labeler-action
129+
tags:
130+
- pull request
131+
- labels

includes/all-articles.html

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{% assign product = siteTree[currentLanguage][currentVersion].products[currentProduct] %}
2+
{% assign maxArticles = 10 %}
3+
4+
<div class="py-6">
5+
<h2 class="font-mktg mb-4">All {{ product.title }} docs</h2>
6+
7+
<div class="d-flex gutter flex-wrap">
8+
{% for category in product.categories %}
9+
{% unless category[1].standalone %}
10+
<div class="col-12 col-lg-4 mb-6 height-full">
11+
<h4 class="mb-3"><a href="/{{ currentLanguage }}{{ category[1].href }}">{{ category[1].title }}</a></h4>
12+
13+
{% if category[1].maptopics %}
14+
<ul class="list-style-none">
15+
{% for maptopic in category[1].maptopics %}
16+
{% unless maptopic[1].hidden %}
17+
{% assign numArticles = maptopic[1].articles | obj_size %}
18+
<li>
19+
<a class="text-gray-dark" href="/{{ currentLanguage }}{{ maptopic[1].href }}">{{ maptopic[1].title }}</a>
20+
<ul class="sidebar-articles my-2">
21+
{% for article in maptopic[1].articles %}
22+
<li class="mb-3 {% if forloop.index > maxArticles %}d-none{% endif %}"><a href="/{{ currentLanguage }}{{ article[1].href }}">{{ article[1].title }}</a></li>
23+
{% endfor %}
24+
</ul>
25+
{% if numArticles > maxArticles %}
26+
<button class="js-all-articles-show-more btn-link link-gray">Show {{ numArticles | minus: maxArticles }} more {% octicon "chevron-up" class="v-align-text-bottom" %}</button>
27+
{% endif %}
28+
</li>
29+
{% endunless %}
30+
{% endfor %}
31+
</ul>
32+
{% else %}
33+
<ul class="list-style-none">
34+
{% assign numArticles = category[1].articles | obj_size %}
35+
{% for article in category[1].articles %}
36+
<li class="mb-3 {% if forloop.index > maxArticles %}d-none{% endif %}"><a href="/{{ currentLanguage }}{{ article[1].href }}">{{ article[1].title }}</a></li>
37+
{% endfor %}
38+
</ul>
39+
{% if numArticles > maxArticles %}
40+
<button class="js-all-articles-show-more btn-link link-gray">Show {{ numArticles | minus: maxArticles }} more {% octicon "chevron-up" class="v-align-text-bottom" %}</button>
41+
{% endif %}
42+
{% endif %}
43+
</div>
44+
{% endunless %}
45+
{% endfor %}
46+
</div>
47+
</div>

includes/code-example-card.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<div class="col-12 col-xl-4 col-lg-6 mb-4 js-code-example-card {% if forloop.index0 > 5 %}d-none{% endif %}" data-tags="{{ example.tags | join: ', ' }}" data-title="{{ example.title }}" data-description="{{ example.description }}">
2+
<a
3+
class="Box d-flex flex-column flex-justify-between height-full box-shadow-medium hover-shadow-large no-underline text-gray-dark"
4+
href="https://github.com/{{ example.href }}"
5+
>
6+
<div class="p-4">
7+
<h4>{{ example.title }}</h4>
8+
<p class="mt-2 mb-4 text-gray-light">{{ example.description }}</p>
9+
<div class="d-flex flex-wrap">
10+
{% for tag in example.tags %}
11+
<span class="IssueLabel text-white bg-blue mr-2 mb-1">{{ tag }}</span>
12+
{% endfor %}
13+
</div>
14+
</div>
15+
<footer class="border-top p-4 text-gray d-flex flex-items-center">
16+
{% octicon "repo" class="flex-shrink-0" %}
17+
<span class="ml-2 text-mono text-small text-blue">{{ example.href }}</span>
18+
</footer>
19+
</a>
20+
</div>

javascripts/all-articles.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* Handles the client-side events for `includes/all-articles.html`.
3+
*/
4+
export default function allArticles () {
5+
const buttons = document.querySelectorAll('button.js-all-articles-show-more')
6+
7+
for (const btn of buttons) {
8+
btn.addEventListener('click', evt => {
9+
// Show all hidden links
10+
const hiddenLinks = evt.currentTarget.parentElement.querySelectorAll('li.d-none')
11+
for (const link of hiddenLinks) {
12+
link.classList.remove('d-none')
13+
}
14+
// Remove the button, since we don't need it anymore
15+
evt.currentTarget.parentElement.removeChild(evt.currentTarget)
16+
})
17+
}
18+
}

0 commit comments

Comments
 (0)