Skip to content

Commit 6a67a7f

Browse files
committed
Merge remote-tracking branch 'origin/main' into yordis/md-formatter
2 parents c91ad7c + 7ce837b commit 6a67a7f

File tree

169 files changed

+4533
-7690
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+4533
-7690
lines changed

.github/workflows/artifacts.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Artifacts
2+
on:
3+
workflow_run:
4+
workflows: ["CI"]
5+
types:
6+
- completed
7+
branches-ignore:
8+
- main
9+
10+
permissions:
11+
pull-requests: write
12+
13+
jobs:
14+
notify:
15+
runs-on: ubuntu-latest
16+
if: ${{ github.event.workflow_run.event == 'pull_request' }}
17+
steps:
18+
- uses: actions/github-script@v7
19+
with:
20+
script: |
21+
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
22+
owner: context.repo.owner,
23+
repo: context.repo.repo,
24+
run_id: context.payload.workflow_run.id
25+
});
26+
27+
if (artifacts.data.total_count !== 1) {
28+
throw new Error('Expected one artifact')
29+
}
30+
31+
const artifact = artifacts.data.artifacts[0];
32+
const download = await github.rest.actions.downloadArtifact({
33+
owner: context.repo.owner,
34+
repo: context.repo.repo,
35+
artifact_id: artifact.id,
36+
archive_format: 'zip'
37+
});
38+
39+
const fs = require('fs');
40+
fs.writeFileSync('artifact.zip', Buffer.from(download.data));
41+
require('child_process').execSync('unzip artifact.zip');
42+
const ghInfo = JSON.parse(fs.readFileSync('gh.json', 'utf8'));
43+
const pullNumber = ghInfo.number;
44+
45+
const artifactUrl = `${context.payload.workflow_run.html_url}/artifacts/${artifact.id}`;
46+
const commentBody = `<!-- build-artifact-comment -->\n📦 Docs artifacts are ready: ${artifactUrl}`;
47+
48+
const comments = await github.rest.issues.listComments({
49+
owner: context.repo.owner,
50+
repo: context.repo.repo,
51+
issue_number: pullNumber
52+
});
53+
54+
const botComment = comments.data.find(comment =>
55+
comment.user.type === 'Bot' &&
56+
comment.body.includes('<!-- build-artifact-comment -->')
57+
);
58+
59+
if (botComment) {
60+
await github.rest.issues.updateComment({
61+
owner: context.repo.owner,
62+
repo: context.repo.repo,
63+
comment_id: botComment.id,
64+
body: commentBody
65+
});
66+
} else {
67+
await github.rest.issues.createComment({
68+
owner: context.repo.owner,
69+
repo: context.repo.repo,
70+
issue_number: pullNumber,
71+
body: commentBody
72+
});
73+
}

.github/workflows/ci.yml

Lines changed: 77 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,109 @@
11
name: CI
22

3-
on:
4-
pull_request:
5-
push:
3+
on: [pull_request, push]
64

75
env:
8-
node-version: 18.x
6+
MIX_ENV: test
97

108
jobs:
11-
mix_test:
12-
runs-on: ubuntu-20.04
13-
env:
14-
MIX_ENV: test
9+
assets:
10+
runs-on: ubuntu-latest
1511
strategy:
16-
fail-fast: false
1712
matrix:
1813
include:
19-
- pair: # Test very old Elixir and Erlang
20-
elixir: "1.14"
21-
otp: "25"
22-
- pair: # Test Erlang without -doc attribute support
23-
elixir: "1.16"
24-
otp: "26"
25-
- pair: # Test Erlang with -doc attribute support
26-
elixir: "1.17"
27-
otp: "27"
28-
lint: lint
14+
- elixir: "1.17"
15+
otp: "27"
16+
node: 18.x
2917
steps:
3018
- uses: actions/checkout@v3
3119

32-
- uses: erlef/setup-beam@v1
20+
# Setup Node
21+
- uses: actions/setup-node@v3
3322
with:
34-
otp-version: ${{matrix.pair.otp}}
35-
elixir-version: ${{matrix.pair.elixir}}
36-
37-
- name: Install Dependencies
38-
run: mix deps.get
39-
40-
- run: mix format --check-formatted
41-
if: ${{ matrix.lint }}
42-
43-
- run: mix deps.unlock --check-unused
44-
if: ${{ matrix.lint }}
23+
node-version: ${{matrix.node}}
4524

46-
- run: mix deps.compile
25+
- name: Cache npm dependencies
26+
uses: actions/cache@v3
27+
with:
28+
path: ~/.npm
29+
key: ${{ runner.os }}-node-${{ hashFiles('asssets/package-lock.json') }}
4730

48-
- run: mix compile --warnings-as-errors
49-
if: ${{ matrix.lint }}
31+
- run: npm ci --prefix assets
32+
- run: npm run build --prefix assets
5033

51-
- run: mix test
34+
# Setup Elixir
35+
- uses: erlef/setup-beam@v1
36+
with:
37+
otp-version: ${{ matrix.otp }}
38+
elixir-version: ${{ matrix.elixir }}
5239

53-
- name: Prerelease
40+
# Generate and upload artifacts
41+
- name: Generate docs
5442
run: test/prerelease.sh
5543

56-
- name: Generate docs
44+
- name: Attach docs metadata
5745
run: |
58-
mix docs
59-
test -f doc/index.html && echo "doc/index.html exists."
60-
test -f doc/ExDoc.epub && echo "doc/ExDoc.epub exists."
46+
echo "{\"number\":${{ github.event.number }}}" > test/tmp/contents/doc/gh.json
6147
62-
check_js:
63-
name: Check JS
64-
runs-on: ubuntu-20.04
65-
steps:
66-
- uses: actions/checkout@v3
67-
- uses: actions/setup-node@v3
68-
with:
69-
node-version: ${{ env.node-version }}
70-
- name: Cache npm dependencies
71-
uses: actions/cache@v3
48+
- name: Upload docs
49+
uses: actions/upload-artifact@v4
50+
id: docs-upload
7251
with:
73-
path: ~/.npm
74-
key: ${{ runner.os }}-node-${{ hashFiles('asssets/package-lock.json') }}
75-
- run: npm install --prefix assets
52+
name: docs
53+
path: test/tmp/contents/doc/
54+
55+
# Test JS
7656
- run: npm run lint --prefix assets
77-
- run: sudo apt-get install xvfb
78-
- run: |
57+
- name: npm run test --prefix assets
58+
run: |
59+
sudo apt-get install xvfb
7960
xvfb-run --auto-servernum npm run test --prefix assets
8061
env:
8162
CI: true
8263

83-
assets:
84-
needs: [check_js]
85-
runs-on: ubuntu-20.04
86-
if: github.ref_name == 'main'
87-
steps:
88-
- uses: actions/checkout@v3
89-
- uses: actions/setup-node@v3
90-
with:
91-
node-version: ${{ env.node-version }}
92-
- name: Cache npm dependencies
93-
uses: actions/cache@v3
94-
with:
95-
path: ~/.npm
96-
key: ${{ runner.os }}-node-${{ hashFiles('asssets/package-lock.json') }}
97-
- run: mkdir -p tmp/handlebars
98-
- run: npm ci --prefix assets
99-
- run: npm run build --prefix assets
64+
# Push updated assets if all good
10065
- name: Push updated assets
66+
if: github.ref_name == 'main'
10167
uses: stefanzweifel/git-auto-commit-action@v4
10268
with:
10369
commit_message: Update assets
10470
file_pattern: formatters
71+
72+
elixir:
73+
runs-on: ubuntu-latest
74+
strategy:
75+
fail-fast: false
76+
matrix:
77+
include:
78+
# Test very old Elixir and Erlang
79+
- elixir: "1.15"
80+
otp: "25"
81+
# Test Erlang without -doc attribute support
82+
- elixir: "1.16"
83+
otp: "26"
84+
# Test with initial Erlang doc attribute support
85+
- elixir: "1.17"
86+
otp: "27"
87+
- elixir: "1.18"
88+
otp: "27"
89+
lint: true
90+
steps:
91+
- uses: actions/checkout@v3
92+
93+
- uses: erlef/setup-beam@v1
94+
with:
95+
otp-version: ${{ matrix.otp }}
96+
elixir-version: ${{ matrix.elixir }}
97+
98+
- run: mix deps.get
99+
100+
- run: mix compile --warnings-as-errors
101+
if: ${{ matrix.lint }}
102+
103+
- run: mix test
104+
105+
- run: mix deps.unlock --check-unused
106+
if: ${{ matrix.lint }}
107+
108+
- run: mix format --check-formatted
109+
if: ${{ matrix.lint }}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
otp_version: "26.2.5"
3737
elixir_version: "1.16.2"
3838
- otp: 27
39-
otp_version: "27.0"
40-
elixir_version: "1.17.0"
39+
otp_version: "27.2"
40+
elixir_version: "1.18.2"
4141

4242
runs-on: ubuntu-22.04
4343
steps:

CHANGELOG.md

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,82 @@
11
# Changelog
22

3+
## v0.38.4 (2025-09-09)
4+
5+
* Bug fixes
6+
* Fix escaping of links when they have ampersand in them
7+
* Increase spacing of footers in pages
8+
* Align stale icon positioning
9+
10+
## v0.38.3 (2025-08-17)
11+
12+
* Enhancements
13+
* Allow configuring autocomplete limit, and default it to 10 instead of 8
14+
* Display description text in docs groups
15+
* Load discovered makeup apps for CLI
16+
17+
## v0.38.2 (2025-05-27)
18+
19+
* Bug fixes
20+
* Render documents with hardcoded `<h2>`/`<h3>` entries correctly
21+
* Fix padding on external links
22+
23+
## v0.38.1 (2025-05-12)
24+
25+
* Bug fixes
26+
* Ensure stripping apps for Erlang sources emit valid AST
27+
28+
## v0.38.0 (2025-05-09)
29+
30+
* Enhancements
31+
* Allow listing outside URLs in extras
32+
33+
* Bug fixes
34+
* Ensure some cases where `<`, `>`, `&` and in headers would appear as entities in the sidebar
35+
* Fix outline caused by swup.js on Webkit based browsers
36+
* Fix bugs when computing synopsis
37+
* Automatically close the sidebar when navigating sections on mobile
38+
39+
## v0.37.3 (2025-03-06)
40+
41+
* Bug fixes
42+
* Handle `http-equiv=refresh` during Swup.js navigation
43+
* Include full error description when syntax highlighting fails
44+
45+
## v0.37.2 (2025-02-19)
46+
47+
* Bug fixes
48+
* Fix code highlighting for languages with non-alphanumeric characters
49+
50+
## v0.37.1 (2025-02-10)
51+
52+
* Enhancements
53+
* Support umbrella projects via the CLI
54+
55+
* Bug fixes
56+
* Make sure docs are rendered inside iframes
57+
58+
## v0.37.0 (2025-02-05)
59+
60+
Thanks to @liamcmitchell and @hichemfantar for the extensive contributions in this new release.
61+
62+
* Enhancements
63+
* Optimize and parallelize module retriever, often leading to 20x-30x faster docs generation
64+
* Considerably improve page loading times in the browser
65+
* Allow customizing `search_data` for extra pages
66+
* Use native style for scroll bars
67+
* Enhance links between extras/pages/guides with padding and hover effects
68+
* Go to latest goes to the same page if it exists, root otherwise
69+
* Apply new style and layout for tabs
70+
* Increase font-weight on sidebar on Apple machines/devices
71+
* Improve accessibility across deprecation, links, and summaries
72+
* Add compatibility to Erlang/OTP 28+
73+
* Rely on the operating system monospace font for unified experience and better load times
74+
* Introduce `"exdoc:loaded"` window event to track navigation
75+
* Support for favicons
76+
77+
* Bug fixes
78+
* Move action links out from heading tags
79+
380
## v0.36.1 (2024-12-24)
481

582
* Enhancements
@@ -190,7 +267,7 @@ This release requires Elixir v1.13.
190267
## v0.30.6 (2023-08-25)
191268

192269
* Enhancements
193-
* Extract title from Markdown file when preceeded with comments
270+
* Extract title from Markdown file when preceded with comments
194271
* Improve focus navigation in notebooks
195272

196273
## v0.30.5 (2023-08-12)
@@ -333,7 +410,7 @@ This release requires Elixir v1.13.
333410

334411
## v0.28.3 (2022-03-23)
335412

336-
* Enhacements
413+
* Enhancements
337414
* Include page titles in autocomplete suggestions
338415
* Allow theme to be set to "System" version
339416
* Remove "Specs" heading and render full typespecs

Cheatsheet.cheatmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ Paragraphs are visually distinct from one another.
4747
| `%A, %B %e, %Y` | `Sunday, June 5, 2013` |
4848
| `%b %e %a` | `Jun 5 Sun` |
4949

50+
### [Link](`mix docs`)
51+
52+
Header with links in it.
53+
5054
## Variants
5155
{: .col-2}
5256

0 commit comments

Comments
 (0)