Skip to content

Commit b222922

Browse files
committed
Merge branch 'dev' into weth-edit
2 parents 6cc21c6 + 351a874 commit b222922

30 files changed

+1028
-411
lines changed

.all-contributorsrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,8 @@
13081308
"avatar_url": "https://avatars2.githubusercontent.com/u/25974464?v=4",
13091309
"profile": "https://twitter.com/wslyvh",
13101310
"contributions": [
1311-
"content"
1311+
"content",
1312+
"infra"
13121313
]
13131314
},
13141315
{
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Import community events
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * SUN" # Runs every Sunday at midnight
6+
workflow_dispatch:
7+
8+
jobs:
9+
create_pr:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@master
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: 18
16+
- run: yarn install
17+
- run: yarn events-import
18+
env:
19+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
20+
- uses: EndBug/add-and-commit@v9
21+
with:
22+
default_author: github_actions
23+
message: "Update community events"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
371371
<td align="center" valign="top" width="14.28%"><a href="https://www.yazkhoury.com"><img src="https://avatars2.githubusercontent.com/u/9094204?v=4?s=100" width="100px;" alt="Yaz Khoury"/><br /><sub><b>Yaz Khoury</b></sub></a><br /><a href="#content-YazzyYaz" title="Content">🖋</a></td>
372372
<td align="center" valign="top" width="14.28%"><a href="http://yos.io"><img src="https://avatars3.githubusercontent.com/u/1084226?v=4?s=100" width="100px;" alt="Yos Riady"/><br /><sub><b>Yos Riady</b></sub></a><br /><a href="#content-yosriady" title="Content">🖋</a></td>
373373
<td align="center" valign="top" width="14.28%"><a href="http://infura.io"><img src="https://avatars2.githubusercontent.com/u/1210802?v=4?s=100" width="100px;" alt="Andrew Cohen"/><br /><sub><b>Andrew Cohen</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Aandrewjcohen" title="Bug reports">🐛</a></td>
374-
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/wslyvh"><img src="https://avatars2.githubusercontent.com/u/25974464?v=4?s=100" width="100px;" alt="Wesley van Heije"/><br /><sub><b>Wesley van Heije</b></sub></a><br /><a href="#content-wslyvh" title="Content">🖋</a></td>
374+
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/wslyvh"><img src="https://avatars2.githubusercontent.com/u/25974464?v=4?s=100" width="100px;" alt="Wesley van Heije"/><br /><sub><b>Wesley van Heije</b></sub></a><br /><a href="#content-wslyvh" title="Content">🖋</a> <a href="#infra-wslyvh" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
375375
</tr>
376376
<tr>
377377
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gr0uch0dev"><img src="https://avatars1.githubusercontent.com/u/17497722?v=4?s=100" width="100px;" alt="gr0uch0dev"/><br /><sub><b>gr0uch0dev</b></sub></a><br /><a href="#content-gr0uch0dev" title="Content">🖋</a></td>

docs/header-ids.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Custom header IDs for markdown documents
2+
3+
Html ID attributes are used to create links to specific sections of a document. In markdown, **custom header IDs** should be assigned to all header lines (lines that begin with one-or-more hash marks, `#`).
4+
5+
## Markdown syntax
6+
7+
A custom heading ID should follow these rules:
8+
9+
- Placed at the end of a heading line, preceded by a space, followed by a line break
10+
- Wrapped in curly braces
11+
- Starts with a hash-mark
12+
- Uses kebab-case string
13+
- Unique for the current page
14+
15+
For example:
16+
17+
```markdown
18+
## My heading {#my-heading}
19+
20+
### A subheading {#a-subheading}
21+
22+
#### Or a longer title that can be shortened {#long-heading}
23+
```
24+
25+
Note that for short headers, simply lowercasing and using hyphens instead of spaces is sufficient. For longer headers, a shortened concise version of the header is encouraged. Must not repeat the same ID on the same page.
26+
27+
## How are these used?
28+
29+
When these headers are rendered, they come with a link icon attached to it that can be used to quickly link to that section of the document.
30+
31+
Extending the above example, if we wanted to link to the `A subheading` section of the above document (for example living at path `/docs`), you could use the link`/docs#a-subheading` to link directly to that section.
32+
33+
See a live example on ethereum.org: [https://ethereum.org/en/developers/docs/blocks/#block-anatomy](https://ethereum.org/en/developers/docs/blocks/#block-anatomy)
34+
35+
## When to use custom header IDs
36+
37+
### English content
38+
39+
These should be created for header on every new English markdown document.
40+
41+
### Translated content
42+
43+
English files are uploaded to Crowdin for translation. Header ID's should be _inherited_ from the English version, and remain unchanged during translation.
44+
45+
This is to ensure that the translated content can be linked to from other documents and external links, without breaking the path. This is similar to why path and filenames are not translated, but remain in English to simplify linking and referencing.
46+
47+
See a live example on ethereum.org: [https://ethereum.org/es/developers/docs/blocks/#block-anatomy](https://ethereum.org/en/developers/docs/blocks/#block-anatomy)
48+
49+
Notice the header ID is still in English (`#block-anatomy`), but links to the Spanish (`/es/`) version of the site, at the correct section.
50+
51+
## When are these not needed?
52+
53+
Markdown files in the repo `/docs` (such as this one) do not require custom header IDs, as they are not yet displayed on the website, and do not have translated versions.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"chromatic": "chromatic --project-token fee8e66c9916",
1818
"crowdin-clean": "rm -rf .crowdin && mkdir .crowdin",
1919
"crowdin-import": "ts-node src/scripts/crowdin-import.ts",
20+
"events-import": "ts-node -O '{ \"module\": \"commonjs\" }' src/scripts/events-import.ts",
2021
"markdown-checker": "ts-node -O '{ \"module\": \"commonjs\" }' src/scripts/markdownChecker.ts"
2122
},
2223
"dependencies": {

public/fonts/inter/cyrillic-ext.woff2

26.6 KB
Binary file not shown.

public/fonts/inter/cyrillic.woff2

17.2 KB
Binary file not shown.

public/fonts/inter/greek-ext.woff2

12.4 KB
Binary file not shown.

public/fonts/inter/greek.woff2

22 KB
Binary file not shown.

public/fonts/inter/latin-ext.woff2

78.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)