Skip to content

Commit ddbf20f

Browse files
build(doks): migrate from doks v1.8 to v1.9
1 parent 3e1d9bf commit ddbf20f

7 files changed

Lines changed: 1389 additions & 258 deletions

File tree

.npmrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

config/_default/hugo.toml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,29 @@ defaultContentLanguage = "ja"
1616
disableLanguages = ["de", "nl"]
1717
defaultContentLanguageInSubdir = true
1818

19-
copyRight = "Copyright (c) 2023-2025 Alice Project"
19+
copyRight = "Copyright (c) 2023-2026 Alice Project"
2020

2121
[build.buildStats]
2222
enable = true
2323

2424
[outputs]
25-
home = ["HTML", "RSS", "searchIndex"]
26-
section = ["HTML", "RSS", "SITEMAP"]
25+
home = ["html", "rss", "sitemap", "searchIndex", "llms"]
26+
page = ["html", "markdown"]
27+
section = ["html", "rss", "sitemap"]
28+
taxonomy = ["html", "rss", "sitemap"]
29+
term = ["html", "rss", "sitemap"]
30+
31+
[outputFormats.markdown]
32+
baseName = "index"
33+
isHTML = false
34+
isPlainText = true
35+
mediaType = "text/markdown"
36+
37+
[outputFormats.llms]
38+
baseName = "llms"
39+
isHTML = false
40+
isPlainText = true
41+
mediaType = "text/plain"
2742

2843
[outputFormats.searchIndex]
2944
mediaType = "application/json"
@@ -46,7 +61,7 @@ copyRight = "Copyright (c) 2023-2025 Alice Project"
4661
priority = 0.5
4762

4863
[caches]
49-
[caches.getjson]
64+
[caches.getresource]
5065
dir = ":cacheDir/:project"
5166
maxAge = -1 # "30m"
5267

config/_default/module.toml

Lines changed: 44 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -7,56 +7,45 @@
77
# the site. They allow for custom directory structures and integrating content
88
# from different locations.
99

10-
# mounts
11-
## archetypes
12-
[[mounts]]
13-
source = "node_modules/@thulite/doks-core/archetypes"
14-
target = "archetypes"
15-
16-
[[mounts]]
17-
source = "archetypes"
18-
target = "archetypes"
19-
20-
## assets
10+
## content
2111
[[mounts]]
22-
source = "node_modules/@thulite/core/assets"
23-
target = "assets"
12+
source = "content"
13+
target = "content"
2414

15+
## data
2516
[[mounts]]
26-
source = "node_modules/@thulite/doks-core/assets"
27-
target = "assets"
17+
source = "node_modules/@thulite/doks-core/data"
18+
target = "data"
2819

2920
[[mounts]]
30-
source = "node_modules/@tabler/icons/icons"
31-
target = "assets/svgs/tabler-icons"
21+
source = "data"
22+
target = "data"
3223

24+
## layouts
3325
[[mounts]]
34-
source = "node_modules/@thulite/images/assets"
35-
target = "assets"
26+
source = "layouts"
27+
target = "layouts"
3628

3729
[[mounts]]
38-
source = "assets"
39-
target = "assets"
30+
files = ['! home.html']
31+
source = "node_modules/@thulite/doks-core/layouts"
32+
target = "layouts"
4033

41-
## content
4234
[[mounts]]
43-
source = "content/en"
44-
target = "content"
45-
lang = "en"
35+
source = "node_modules/@thulite/core/layouts"
36+
target = "layouts"
4637

4738
[[mounts]]
48-
source = "content/ja"
49-
target = "content"
50-
lang = "ja"
39+
source = "node_modules/@thulite/seo/layouts"
40+
target = "layouts"
5141

52-
## data
5342
[[mounts]]
54-
source = "node_modules/@thulite/doks-core/data"
55-
target = "data"
43+
source = "node_modules/@thulite/images/layouts"
44+
target = "layouts"
5645

5746
[[mounts]]
58-
source = "data"
59-
target = "data"
47+
source = "node_modules/@thulite/inline-svg/layouts"
48+
target = "layouts"
6049

6150
## i18n
6251
[[mounts]]
@@ -67,32 +56,39 @@
6756
source = "i18n"
6857
target = "i18n"
6958

70-
## layouts
59+
## archetypes
7160
[[mounts]]
72-
source = "layouts"
73-
target = "layouts"
61+
source = "node_modules/@thulite/doks-core/archetypes"
62+
target = "archetypes"
7463

7564
[[mounts]]
76-
# Exclude 'home.html' to avoid conflicts with a custom home page layout defined in the local 'layouts' directory.
77-
excludeFiles = "home.html"
78-
source = "node_modules/@thulite/doks-core/layouts"
79-
target = "layouts"
65+
source = "archetypes"
66+
target = "archetypes"
8067

68+
## assets
8169
[[mounts]]
82-
source = "node_modules/@thulite/core/layouts"
83-
target = "layouts"
70+
source = "node_modules/@thulite/core/assets"
71+
target = "assets"
8472

8573
[[mounts]]
86-
source = "node_modules/@thulite/seo/layouts"
87-
target = "layouts"
74+
source = "node_modules/@thulite/doks-core/assets"
75+
target = "assets"
8876

8977
[[mounts]]
90-
source = "node_modules/@thulite/images/layouts"
91-
target = "layouts"
78+
source = "node_modules/@tabler/icons/icons"
79+
target = "assets/svgs/tabler-icons"
9280

9381
[[mounts]]
94-
source = "node_modules/@thulite/inline-svg/layouts"
95-
target = "layouts"
82+
source = "node_modules/@thulite/images/assets"
83+
target = "assets"
84+
85+
[[mounts]]
86+
source = "hugo_stats.json"
87+
target = "assets/watching/hugo_stats.json"
88+
89+
[[mounts]]
90+
source = "assets"
91+
target = "assets"
9692

9793
## static
9894
[[mounts]]

config/_default/params.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ title = "My Docs"
33
description = "Congrats on setting up a new Doks project!"
44
images = ["cover.png"]
55

6+
# Enable mathematical rendering on every page (unless you set the `math` parameter to `false` in front matter)
7+
math = false # false (default) or true
8+
mathEngine = "KaTeX" # "KaTeX" (default) or "MathJax"
9+
610
# mainSections
711
mainSections = ["docs"]
812

@@ -17,7 +21,7 @@ mainSections = ["docs"]
1721

1822
# Navbar
1923
navbarSticky = true # true (default) or false
20-
containerBreakpoint = "lg" # "", "sm", "md", "lg" (default), "xl", "xxl", or "fluid"
24+
containerBreakpoint = "fluid" # "", "sm", "md", "lg", "xl", "xxl", or "fluid" (default)
2125

2226
## Button
2327
navBarButton = false # false (default) or true
@@ -44,6 +48,7 @@ mainSections = ["docs"]
4448
bootstrapJavascript = false # false (default) or true
4549

4650
# Nav
51+
sectionSwitcher = false # true or false (default)
4752
sectionNav = ["docs"] # ["docs"] (default) or list of sections (e.g. ["docs", "guides"])
4853
toTopButton = false # false (default) or true
4954
breadcrumbTrail = false # false (default) or true
@@ -59,6 +64,7 @@ mainSections = ["docs"]
5964
docsVersion = "1.0"
6065

6166
# UX
67+
aiButtons = false # true (default) or false
6268
headerBar = false # true (default) or false
6369
backgroundDots = true # true (default) or false
6470

@@ -114,6 +120,7 @@ mainSections = ["docs"]
114120
# Inline SVG (@thulite/inline-svg)
115121
[inline_svg]
116122
iconSetDir = "tabler-icons" # "tabler-icons" (default)
123+
iconSetVariant = "outline" # outline (default) or filled
117124

118125
# SEO (@thulite/seo)
119126
[seo]
@@ -136,3 +143,5 @@ mainSections = ["docs"]
136143
newsArticle = [] # NewsArticle sections
137144
blogPosting = ["blog"] # BlogPosting sections
138145
product = [] # Product sections
146+
[seo.description]
147+
summaryFallback = "" # "" (default)

config/postcss.config.js

Lines changed: 58 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,61 @@
1-
const autoprefixer = require('autoprefixer');
2-
const { purgeCSSPlugin } = require('@fullhuman/postcss-purgecss');
3-
const whitelister = require('purgecss-whitelister');
1+
import autoprefixer from 'autoprefixer';
2+
import purgeCSSPlugin from '@fullhuman/postcss-purgecss';
43

5-
module.exports = {
6-
plugins: [
7-
autoprefixer(),
8-
purgeCSSPlugin({
9-
content: ['./hugo_stats.json'],
10-
extractors: [
11-
{
12-
extractor: (content) => {
13-
const els = JSON.parse(content).htmlElements;
14-
return els.tags.concat(els.classes, els.ids);
15-
},
16-
extensions: ['json']
17-
}
18-
],
19-
dynamicAttributes: [
20-
'aria-expanded',
21-
'data-bs-popper',
22-
'data-bs-target',
23-
'data-bs-theme',
24-
'data-dark-mode',
25-
'data-global-alert',
26-
'data-pane', // tabs.js
27-
'data-popper-placement',
28-
'data-sizes',
29-
'data-toggle-tab', // tabs.js
30-
'id',
31-
'size',
32-
'type'
33-
],
34-
safelist: [
35-
'active',
36-
'btn-clipboard', // clipboards.js
37-
'clipboard', // clipboards.js
38-
'disabled',
39-
'hidden',
40-
'modal-backdrop', // search-modal.js
41-
'selected', // search-modal.js
42-
'show',
43-
'img-fluid',
44-
'blur-up',
45-
'lazyload',
46-
'lazyloaded',
47-
'alert-link',
48-
'container-fw ',
49-
'container-lg',
50-
'container-fluid',
51-
'offcanvas-backdrop',
52-
'figcaption',
53-
'dt',
54-
'dd',
55-
'showing',
56-
'hiding',
57-
'page-item',
58-
'page-link',
59-
'not-content',
60-
...whitelister(['./assets/scss/**/*.scss', './node_modules/@thulite/doks-core/assets/scss/components/_code.scss', './node_modules/@thulite/doks-core/assets/scss/components/_expressive-code.scss', './node_modules/@thulite/doks-core/assets/scss/common/_syntax.scss'])
61-
]
62-
})
4+
const purgecss = purgeCSSPlugin({
5+
content: ['./hugo_stats.json'],
6+
defaultExtractor: (content) => {
7+
const els = JSON.parse(content).htmlElements;
8+
return [...(els.tags || []), ...(els.classes || []), ...(els.ids || [])];
9+
},
10+
dynamicAttributes: [
11+
'aria-expanded',
12+
'data-bs-popper',
13+
'data-bs-target',
14+
'data-bs-theme',
15+
'data-dark-mode',
16+
'data-global-alert',
17+
'data-pane', // tabs.js
18+
'data-popper-placement',
19+
'data-sizes',
20+
'data-toggle-tab', // tabs.js
21+
'id',
22+
'size',
23+
'type'
24+
],
25+
safelist: [
26+
'active',
27+
'btn-clipboard', // clipboards.js
28+
'clipboard', // clipboards.js
29+
'disabled',
30+
'hidden',
31+
'modal-backdrop', // search-modal.js
32+
'selected', // search-modal.js
33+
'show',
34+
'img-fluid',
35+
'blur-up',
36+
'lazyload',
37+
'lazyloaded',
38+
'alert-link',
39+
'container-fw ',
40+
'container-lg',
41+
'container-fluid',
42+
'offcanvas-backdrop',
43+
'figcaption',
44+
'dt',
45+
'dd',
46+
'showing',
47+
'hiding',
48+
'page-item',
49+
'page-link',
50+
'not-content',
51+
'copy',
52+
'btn-copy',
6353
]
54+
});
55+
56+
export default {
57+
plugins: [
58+
autoprefixer(),
59+
...(process.env.HUGO_ENVIRONMENT === "production" ? [purgecss] : []),
60+
],
6461
};

0 commit comments

Comments
 (0)