Skip to content

Commit 3042fd3

Browse files
authored
add Ash chapter (#5)
* update Antora version to match generated HTML files * add Ash chapter
1 parent e81610e commit 3042fd3

File tree

119 files changed

+18201
-385
lines changed

Some content is hidden

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

119 files changed

+18201
-385
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.io/antora/antora:3.1.10
1+
FROM docker.io/antora/antora:3.1.12
22

33
RUN yarn global add asciidoctor-kroki
44
RUN yarn global add asciidoctor-emoji

docs/_/css/site.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/_/js/search-ui.js

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,9 @@
133133
document.head.appendChild(link);
134134
}
135135

136-
function highlightPageTitle (title, terms) {
137-
const positions = getTermPosition(title, terms);
138-
return buildHighlightedText(title, positions, snippetLength)
139-
}
140-
141136
function highlightSectionTitle (sectionTitle, terms) {
142137
if (sectionTitle) {
143-
const text = sectionTitle.text;
138+
const text = sectionTitle.title ?? sectionTitle.text;
144139
const positions = getTermPosition(text, terms);
145140
return buildHighlightedText(text, positions, snippetLength)
146141
}
@@ -156,8 +151,7 @@
156151
return []
157152
}
158153

159-
function highlightText (doc, terms) {
160-
const text = doc.text;
154+
function highlightText (text, terms) {
161155
const positions = getTermPosition(text, terms);
162156
return buildHighlightedText(text, positions, snippetLength)
163157
}
@@ -183,9 +177,12 @@
183177
}
184178
}
185179
return {
186-
pageTitleNodes: highlightPageTitle(doc.title, terms.title || []),
180+
pageTitleNodes: highlightText(doc.title, terms.title || []),
187181
sectionTitleNodes: highlightSectionTitle(sectionTitle, terms.title || []),
188-
pageContentNodes: highlightText(doc, terms.text || []),
182+
pageContentNodes: highlightText(
183+
sectionTitle?.title && sectionTitle.text ? sectionTitle.text : doc.text,
184+
terms.text || []
185+
),
189186
pageKeywordNodes: highlightKeyword(doc, terms.keyword || []),
190187
}
191188
}
@@ -199,12 +196,12 @@
199196
let sectionTitle;
200197
if (ids.length > 1) {
201198
const titleId = ids[1];
202-
sectionTitle = doc.titles.filter(function (item) {
199+
sectionTitle = doc.titles.find(function (item) {
203200
return String(item.id) === titleId
204-
})[0];
201+
});
205202
}
206203
const metadata = item.matchData.metadata;
207-
const highlightingResult = highlightHit(metadata, sectionTitle, doc);
204+
const highlightingResult = highlightHit(metadata, sectionTitle || doc, doc);
208205
const componentVersion = store.componentVersions[`${doc.component}/${doc.version}`];
209206
if (componentVersion !== undefined && currentComponent !== componentVersion) {
210207
const searchResultComponentHeader = document.createElement('div');

docs/abstract.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ <h3 class="title"><a href="index.html">Elixir Full-Stack</a></h3>
196196
<li class="nav-item" data-depth="1">
197197
<a class="nav-link" href="elixir/testing.html">Testing: Stoic API</a>
198198
</li>
199+
<li class="nav-item" data-depth="1">
200+
<a class="nav-link" href="elixir/ash.html">Ash: Stoic API</a>
201+
</li>
199202
<li class="nav-item" data-depth="1">
200203
<a class="nav-link" href="elixir/commands.html">Makefiles</a>
201204
</li>

docs/afterword.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ <h3 class="title"><a href="index.html">Elixir Full-Stack</a></h3>
196196
<li class="nav-item" data-depth="1">
197197
<a class="nav-link" href="elixir/testing.html">Testing: Stoic API</a>
198198
</li>
199+
<li class="nav-item" data-depth="1">
200+
<a class="nav-link" href="elixir/ash.html">Ash: Stoic API</a>
201+
</li>
199202
<li class="nav-item" data-depth="1">
200203
<a class="nav-link" href="elixir/commands.html">Makefiles</a>
201204
</li>

docs/authors.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ <h3 class="title"><a href="index.html">Elixir Full-Stack</a></h3>
196196
<li class="nav-item" data-depth="1">
197197
<a class="nav-link" href="elixir/testing.html">Testing: Stoic API</a>
198198
</li>
199+
<li class="nav-item" data-depth="1">
200+
<a class="nav-link" href="elixir/ash.html">Ash: Stoic API</a>
201+
</li>
199202
<li class="nav-item" data-depth="1">
200203
<a class="nav-link" href="elixir/commands.html">Makefiles</a>
201204
</li>

docs/bibliography.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ <h3 class="title"><a href="index.html">Elixir Full-Stack</a></h3>
196196
<li class="nav-item" data-depth="1">
197197
<a class="nav-link" href="elixir/testing.html">Testing: Stoic API</a>
198198
</li>
199+
<li class="nav-item" data-depth="1">
200+
<a class="nav-link" href="elixir/ash.html">Ash: Stoic API</a>
201+
</li>
199202
<li class="nav-item" data-depth="1">
200203
<a class="nav-link" href="elixir/commands.html">Makefiles</a>
201204
</li>

docs/book.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ <h3 class="title"><a href="index.html">Elixir Full-Stack</a></h3>
196196
<li class="nav-item" data-depth="1">
197197
<a class="nav-link" href="elixir/testing.html">Testing: Stoic API</a>
198198
</li>
199+
<li class="nav-item" data-depth="1">
200+
<a class="nav-link" href="elixir/ash.html">Ash: Stoic API</a>
201+
</li>
199202
<li class="nav-item" data-depth="1">
200203
<a class="nav-link" href="elixir/commands.html">Makefiles</a>
201204
</li>

docs/colophon.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ <h3 class="title"><a href="index.html">Elixir Full-Stack</a></h3>
196196
<li class="nav-item" data-depth="1">
197197
<a class="nav-link" href="elixir/testing.html">Testing: Stoic API</a>
198198
</li>
199+
<li class="nav-item" data-depth="1">
200+
<a class="nav-link" href="elixir/ash.html">Ash: Stoic API</a>
201+
</li>
199202
<li class="nav-item" data-depth="1">
200203
<a class="nav-link" href="elixir/commands.html">Makefiles</a>
201204
</li>

docs/dedication.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ <h3 class="title"><a href="index.html">Elixir Full-Stack</a></h3>
196196
<li class="nav-item" data-depth="1">
197197
<a class="nav-link" href="elixir/testing.html">Testing: Stoic API</a>
198198
</li>
199+
<li class="nav-item" data-depth="1">
200+
<a class="nav-link" href="elixir/ash.html">Ash: Stoic API</a>
201+
</li>
199202
<li class="nav-item" data-depth="1">
200203
<a class="nav-link" href="elixir/commands.html">Makefiles</a>
201204
</li>

0 commit comments

Comments
 (0)