diff --git a/web/assets/js/custom.js b/web/assets/js/custom.js index c5525d04e..b1746116f 100644 --- a/web/assets/js/custom.js +++ b/web/assets/js/custom.js @@ -1 +1 @@ -// Put your custom JS code here +// Put your custom JS code here diff --git a/web/assets/jsconfig.json b/web/assets/jsconfig.json index 7a19b7145..d4ee6dcbf 100644 --- a/web/assets/jsconfig.json +++ b/web/assets/jsconfig.json @@ -1,8 +1,8 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "paths": { - "*": ["*", "..\\node_modules\\@thulite\\doks-core\\assets\\*"] - } - } -} +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "*": ["*", "..\\node_modules\\@thulite\\doks-core\\assets\\*"] + } + } +} diff --git a/web/assets/scss/common/_custom.scss b/web/assets/scss/common/_custom.scss index 9aaa071fc..1e2f91b80 100644 --- a/web/assets/scss/common/_custom.scss +++ b/web/assets/scss/common/_custom.scss @@ -1,5 +1,5 @@ -// Put your custom SCSS code here - -code.language-console .line .cl .gp { - user-select: none; -} +// Put your custom SCSS code here + +code.language-console .line .cl .gp { + user-select: none; +} diff --git a/web/assets/scss/common/_variables-custom.scss b/web/assets/scss/common/_variables-custom.scss index d2280ccd4..56c9eb79e 100644 --- a/web/assets/scss/common/_variables-custom.scss +++ b/web/assets/scss/common/_variables-custom.scss @@ -1 +1 @@ -// Put your custom SCSS variables here +// Put your custom SCSS variables here diff --git a/web/config/_default/hugo.toml b/web/config/_default/hugo.toml index 0330140ee..05dad2cdc 100644 --- a/web/config/_default/hugo.toml +++ b/web/config/_default/hugo.toml @@ -1,86 +1,86 @@ -title = "Snix" -baseurl = "http://snix.dev/" -canonifyURLs = false -disableAliases = true -disableHugoGeneratorInject = true -# disableKinds = ["taxonomy", "term"] -enableEmoji = true -enableGitInfo = false -enableRobotsTXT = true -languageCode = "en-US" -pagerSize = 10 -rssLimit = 10 -summarylength = 20 # 70 (default) - -# Multilingual -defaultContentLanguage = "en" -disableLanguages = ["de", "nl"] -defaultContentLanguageInSubdir = false - -copyRight = "Copyright (c) 2025 The Snix Project" - -[build.buildStats] - enable = true - -[outputs] - home = ["HTML", "RSS", "searchIndex"] - section = ["HTML", "RSS", "SITEMAP"] - -[outputFormats.searchIndex] - mediaType = "application/json" - baseName = "search-index" - isPlainText = true - notAlternative = true - -# Add output format for section sitemap.xml -[outputFormats.SITEMAP] - mediaType = "application/xml" - baseName = "sitemap" - isHTML = false - isPlainText = true - noUgly = true - rel = "sitemap" - -[sitemap] - changefreq = "monthly" - filename = "sitemap.xml" - priority = 0.5 - -[caches] - [caches.getjson] - dir = ":cacheDir/:project" - maxAge = -1 # "30m" - -[taxonomies] - contributor = "contributors" - category = "categories" - tag = "tags" - -[permalinks] - blog = "/blog/:slug/" - docs = "/docs/:sections[1:]/:slug/" -# docs = "/docs/1.0/:sections[1:]/:slug/" - -[minify.tdewolff.html] - keepWhitespace = false - -[related] - threshold = 80 - includeNewer = true - toLower = false - [[related.indices]] - name = "categories" - weight = 100 - [[related.indices]] - name = "tags" - weight = 80 - [[related.indices]] - name = "date" - weight = 10 - -[imaging] - anchor = "Center" - bgColor = "#ffffff" - hint = "photo" - quality = 85 - resampleFilter = "Lanczos" +title = "Snix" +baseurl = "http://snix.dev/" +canonifyURLs = false +disableAliases = true +disableHugoGeneratorInject = true +# disableKinds = ["taxonomy", "term"] +enableEmoji = true +enableGitInfo = false +enableRobotsTXT = true +languageCode = "en-US" +pagerSize = 10 +rssLimit = 10 +summarylength = 20 # 70 (default) + +# Multilingual +defaultContentLanguage = "en" +disableLanguages = ["de", "nl"] +defaultContentLanguageInSubdir = false + +copyRight = "Copyright (c) 2025 The Snix Project" + +[build.buildStats] + enable = true + +[outputs] + home = ["HTML", "RSS", "searchIndex"] + section = ["HTML", "RSS", "SITEMAP"] + +[outputFormats.searchIndex] + mediaType = "application/json" + baseName = "search-index" + isPlainText = true + notAlternative = true + +# Add output format for section sitemap.xml +[outputFormats.SITEMAP] + mediaType = "application/xml" + baseName = "sitemap" + isHTML = false + isPlainText = true + noUgly = true + rel = "sitemap" + +[sitemap] + changefreq = "monthly" + filename = "sitemap.xml" + priority = 0.5 + +[caches] + [caches.getjson] + dir = ":cacheDir/:project" + maxAge = -1 # "30m" + +[taxonomies] + contributor = "contributors" + category = "categories" + tag = "tags" + +[permalinks] + blog = "/blog/:slug/" + docs = "/docs/:sections[1:]/:slug/" +# docs = "/docs/1.0/:sections[1:]/:slug/" + +[minify.tdewolff.html] + keepWhitespace = false + +[related] + threshold = 80 + includeNewer = true + toLower = false + [[related.indices]] + name = "categories" + weight = 100 + [[related.indices]] + name = "tags" + weight = 80 + [[related.indices]] + name = "date" + weight = 10 + +[imaging] + anchor = "Center" + bgColor = "#ffffff" + hint = "photo" + quality = 85 + resampleFilter = "Lanczos" diff --git a/web/config/_default/languages.toml b/web/config/_default/languages.toml index ca4db9ff5..e5283380e 100644 --- a/web/config/_default/languages.toml +++ b/web/config/_default/languages.toml @@ -1,9 +1,9 @@ -[en] - languageName = "English" - contentDir = "content/en" - weight = 10 - [en.params] - languageISO = "EN" - languageTag = "en-US" - footer = '' - # alertText = 'Doks version 1.0 just shipped!' +[en] + languageName = "English" + contentDir = "content/en" + weight = 10 + [en.params] + languageISO = "EN" + languageTag = "en-US" + footer = '' + # alertText = 'Doks version 1.0 just shipped!' diff --git a/web/config/_default/markup.toml b/web/config/_default/markup.toml index 23e8d429e..6eaba1e2a 100644 --- a/web/config/_default/markup.toml +++ b/web/config/_default/markup.toml @@ -1,33 +1,33 @@ -defaultMarkdownHandler = "goldmark" - -[goldmark] - [goldmark.extensions] - linkify = false - [goldmark.parser] - autoHeadingID = true - autoHeadingIDType = "github" - [goldmark.parser.attribute] - block = true - title = true - [goldmark.renderer] - unsafe = true - -[highlight] - anchorLineNos = false - codeFences = true - guessSyntax = false - hl_Lines = '' - hl_inline = false - lineAnchors = '' - lineNoStart = 1 - lineNos = false - lineNumbersInTable = false - noClasses = false - noHl = false - style = 'monokai' - tabWidth = 2 - -[tableOfContents] - endLevel = 3 - ordered = false - startLevel = 2 +defaultMarkdownHandler = "goldmark" + +[goldmark] + [goldmark.extensions] + linkify = false + [goldmark.parser] + autoHeadingID = true + autoHeadingIDType = "github" + [goldmark.parser.attribute] + block = true + title = true + [goldmark.renderer] + unsafe = true + +[highlight] + anchorLineNos = false + codeFences = true + guessSyntax = false + hl_Lines = '' + hl_inline = false + lineAnchors = '' + lineNoStart = 1 + lineNos = false + lineNumbersInTable = false + noClasses = false + noHl = false + style = 'monokai' + tabWidth = 2 + +[tableOfContents] + endLevel = 3 + ordered = false + startLevel = 2 diff --git a/web/config/_default/module.toml b/web/config/_default/module.toml index d82136fd0..8073c8563 100644 --- a/web/config/_default/module.toml +++ b/web/config/_default/module.toml @@ -1,87 +1,87 @@ -# mounts -## archetypes -[[mounts]] - source = "node_modules/@thulite/doks-core/archetypes" - target = "archetypes" - -[[mounts]] - source = "archetypes" - target = "archetypes" - -## assets -[[mounts]] - source = "node_modules/@thulite/core/assets" - target = "assets" - -[[mounts]] - source = "node_modules/@thulite/images/assets" - target = "assets" - -[[mounts]] - source = "node_modules/@thulite/doks-core/assets" - target = "assets" - -[[mounts]] - source = "node_modules/@tabler/icons/icons" - target = "assets/svgs/tabler-icons" - -[[mounts]] - source = "assets" - target = "assets" - -## content -[[mounts]] - source = "content" - target = "content" - -## data -[[mounts]] - source = "node_modules/@thulite/doks-core/data" - target = "data" - -[[mounts]] - source = "data" - target = "data" - -## i18n -[[mounts]] - source = "node_modules/@thulite/doks-core/i18n" - target = "i18n" - -[[mounts]] - source = "i18n" - target = "i18n" - -## layouts -[[mounts]] - source = "node_modules/@thulite/core/layouts" - target = "layouts" - -[[mounts]] - source = "node_modules/@thulite/seo/layouts" - target = "layouts" - -[[mounts]] - source = "node_modules/@thulite/images/layouts" - target = "layouts" - -[[mounts]] - source = "node_modules/@thulite/doks-core/layouts" - target = "layouts" - -[[mounts]] - source = "node_modules/@thulite/inline-svg/layouts" - target = "layouts" - -[[mounts]] - source = "layouts" - target = "layouts" - -## static -[[mounts]] - source = "node_modules/@thulite/doks-core/static" - target = "static" - -[[mounts]] - source = "static" - target = "static" +# mounts +## archetypes +[[mounts]] + source = "node_modules/@thulite/doks-core/archetypes" + target = "archetypes" + +[[mounts]] + source = "archetypes" + target = "archetypes" + +## assets +[[mounts]] + source = "node_modules/@thulite/core/assets" + target = "assets" + +[[mounts]] + source = "node_modules/@thulite/images/assets" + target = "assets" + +[[mounts]] + source = "node_modules/@thulite/doks-core/assets" + target = "assets" + +[[mounts]] + source = "node_modules/@tabler/icons/icons" + target = "assets/svgs/tabler-icons" + +[[mounts]] + source = "assets" + target = "assets" + +## content +[[mounts]] + source = "content" + target = "content" + +## data +[[mounts]] + source = "node_modules/@thulite/doks-core/data" + target = "data" + +[[mounts]] + source = "data" + target = "data" + +## i18n +[[mounts]] + source = "node_modules/@thulite/doks-core/i18n" + target = "i18n" + +[[mounts]] + source = "i18n" + target = "i18n" + +## layouts +[[mounts]] + source = "node_modules/@thulite/core/layouts" + target = "layouts" + +[[mounts]] + source = "node_modules/@thulite/seo/layouts" + target = "layouts" + +[[mounts]] + source = "node_modules/@thulite/images/layouts" + target = "layouts" + +[[mounts]] + source = "node_modules/@thulite/doks-core/layouts" + target = "layouts" + +[[mounts]] + source = "node_modules/@thulite/inline-svg/layouts" + target = "layouts" + +[[mounts]] + source = "layouts" + target = "layouts" + +## static +[[mounts]] + source = "node_modules/@thulite/doks-core/static" + target = "static" + +[[mounts]] + source = "static" + target = "static" diff --git a/web/config/_default/params.toml b/web/config/_default/params.toml index 649a9ff17..00dda3c79 100644 --- a/web/config/_default/params.toml +++ b/web/config/_default/params.toml @@ -1,138 +1,138 @@ -# Hugo -title = "My Docs" -description = "Congrats on setting up a new Doks project!" -images = ["cover.png"] - -# mainSections -mainSections = ["docs"] - -[social] - twitter = "getdoks" - -# Doks (@thulite/doks-core) -[doks] - # Color mode - colorMode = "auto" # auto (default), light or dark - colorModeToggler = true # true (default) or false (this setting is only relevant when colorMode = auto) - - # Navbar - navbarSticky = true # true (default) or false - containerBreakpoint = "lg" # "", "sm", "md", "lg" (default), "xl", "xxl", or "fluid" - - ## Button - navBarButton = false # false (default) or true - navBarButtonUrl = "/docs/prologue/introduction/" - navBarButtonText = "Get started" - - # FlexSearch - flexSearch = true # true (default) or false - searchExclKinds = [] # list of page kinds to exclude from search indexing (e.g. ["home", "taxonomy", "term"] ) - searchExclTypes = [] # list of content types to exclude from search indexing (e.g. ["blog", "docs", "legal", "contributors", "categories"]) - showSearch = [] # [] (all pages, default) or homepage (optionally) and list of sections (e.g. ["homepage", "blog", "guides"]) - indexSummary = false # true or false (default); whether to index only the `.Summary` instead of the full `.Content`; limits the respective JSON field size and thus increases loading time - - ## Search results - showDate = false # false (default) or true - showSummary = true # true (default) or false - searchLimit = 99 # 0 (no limit, default) or natural number - - # Global alert - alert = false # false (default) or true - alertDismissable = true # true (default) or false - - # Bootstrap - bootstrapJavascript = false # false (default) or true - - # Nav - sectionNav = ["docs"] # ["docs"] (default) or list of sections (e.g. ["docs", "guides"]) - toTopButton = false # false (default) or true - breadcrumbTrail = false # false (default) or true - headlineHash = true # true (default) or false - scrollSpy = true # true (default) or false - - # Multilingual - multilingualMode = false # false (default) or true - showMissingLanguages = true # whether or not to show untranslated languages in the language menu; true (default) or false - - # Versioning - docsVersioning = false # false (default) or true - docsVersion = "1.0" - - # UX - headerBar = false # true (default) or false - backgroundDots = true # true (default) or false - - # Homepage - sectionFooter = false # false (default) or true - - # Blog - relatedPosts = false # false (default) or true - imageList = true # true (default) or false - imageSingle = true # true (default) or false - - # Repository - editPage = false # false (default) or true - lastMod = false # false (default) or true - repoHost = "GitHub" # GitHub (default), Gitea, GitLab, Bitbucket, or BitbucketServer - docsRepo = "https://github.com/h-enk/doks" - docsRepoBranch = "main" # main (default), master, or - docsRepoSubPath = "" # "" (none, default) or - - # SCSS colors - # backGround = "yellowgreen" - ## Dark theme - # textDark = "#dee2e6" # "#dee2e6" (default), "#dee2e6" (orignal), or custom color - # accentDark = "#5d2f86" # "#5d2f86" (default), "#5d2f86" (original), or custom color - ## Light theme - # textLight = "#1d2d35" # "#1d2d35" (default), "#1d2d35" (orignal), or custom color - # accentLight = "#8ed6fb" # "#8ed6fb" (default), "#8ed6fb" (orignal), or custom color - - # [doks.menu] - # [doks.menu.section] - # auto = true # true (default) or false - # collapsibleSidebar = true # true (default) or false - -# Debug -[render_hooks.image] - errorLevel = 'ignore' # ignore (default), warning, or error (fails the build) - -[render_hooks.link] - errorLevel = 'ignore' # ignore (default), warning, or error (fails the build) - highlightBroken = false # true or false (default) - -# Images (@thulite/images) -[thulite_images] - [thulite_images.defaults] - decoding = "async" # sync, async, or auto (default) - fetchpriority = "auto" # high, low, or auto (default) - loading = "lazy" # eager or lazy (default) - widths = [480, 576, 768, 1025, 1200, 1440] # [640, 768, 1024, 1366, 1600, 1920] for example - sizes = "auto" # 100vw (default), 75vw, or auto for example - process = "" # "fill 1600x900" or "fill 2100x900" for example - lqip = "16x webp q20" # "16x webp q20" or "21x webp q20" for example - -# Inline SVG (@thulite/inline-svg) -[inline_svg] - iconSetDir = "tabler-icons" # "tabler-icons" (default) - -# SEO (@thulite/seo) -[seo] - [seo.title] - separator = " | " - suffix = "" - [seo.favicons] - sizes = [] - icon = "favicon.png" # favicon.png (default) - svgIcon = "favicon.svg" # favicon.svg (default) - maskIcon = "mask-icon.svg" # mask-icon.svg (default) - maskIconColor = "white" # white (default) - [seo.schemas] - type = "Organization" # Organization (default) or Person - logo = "favicon-512x512.png" # Logo of Organization — favicon-512x512.png (default) - name = "Thulite" # Name of Organization or Person - sameAs = [] # E.g. ["https://github.com/thuliteio/thulite", "https://fosstodon.org/@thulite"] - images = ["cover.png"] # ["cover.png"] (default) - article = [] # Article sections - newsArticle = [] # NewsArticle sections - blogPosting = ["blog"] # BlogPosting sections - product = [] # Product sections +# Hugo +title = "My Docs" +description = "Congrats on setting up a new Doks project!" +images = ["cover.png"] + +# mainSections +mainSections = ["docs"] + +[social] + twitter = "getdoks" + +# Doks (@thulite/doks-core) +[doks] + # Color mode + colorMode = "auto" # auto (default), light or dark + colorModeToggler = true # true (default) or false (this setting is only relevant when colorMode = auto) + + # Navbar + navbarSticky = true # true (default) or false + containerBreakpoint = "lg" # "", "sm", "md", "lg" (default), "xl", "xxl", or "fluid" + + ## Button + navBarButton = false # false (default) or true + navBarButtonUrl = "/docs/prologue/introduction/" + navBarButtonText = "Get started" + + # FlexSearch + flexSearch = true # true (default) or false + searchExclKinds = [] # list of page kinds to exclude from search indexing (e.g. ["home", "taxonomy", "term"] ) + searchExclTypes = [] # list of content types to exclude from search indexing (e.g. ["blog", "docs", "legal", "contributors", "categories"]) + showSearch = [] # [] (all pages, default) or homepage (optionally) and list of sections (e.g. ["homepage", "blog", "guides"]) + indexSummary = false # true or false (default); whether to index only the `.Summary` instead of the full `.Content`; limits the respective JSON field size and thus increases loading time + + ## Search results + showDate = false # false (default) or true + showSummary = true # true (default) or false + searchLimit = 99 # 0 (no limit, default) or natural number + + # Global alert + alert = false # false (default) or true + alertDismissable = true # true (default) or false + + # Bootstrap + bootstrapJavascript = false # false (default) or true + + # Nav + sectionNav = ["docs"] # ["docs"] (default) or list of sections (e.g. ["docs", "guides"]) + toTopButton = false # false (default) or true + breadcrumbTrail = false # false (default) or true + headlineHash = true # true (default) or false + scrollSpy = true # true (default) or false + + # Multilingual + multilingualMode = false # false (default) or true + showMissingLanguages = true # whether or not to show untranslated languages in the language menu; true (default) or false + + # Versioning + docsVersioning = false # false (default) or true + docsVersion = "1.0" + + # UX + headerBar = false # true (default) or false + backgroundDots = true # true (default) or false + + # Homepage + sectionFooter = false # false (default) or true + + # Blog + relatedPosts = false # false (default) or true + imageList = true # true (default) or false + imageSingle = true # true (default) or false + + # Repository + editPage = false # false (default) or true + lastMod = false # false (default) or true + repoHost = "GitHub" # GitHub (default), Gitea, GitLab, Bitbucket, or BitbucketServer + docsRepo = "https://github.com/h-enk/doks" + docsRepoBranch = "main" # main (default), master, or + docsRepoSubPath = "" # "" (none, default) or + + # SCSS colors + # backGround = "yellowgreen" + ## Dark theme + # textDark = "#dee2e6" # "#dee2e6" (default), "#dee2e6" (orignal), or custom color + # accentDark = "#5d2f86" # "#5d2f86" (default), "#5d2f86" (original), or custom color + ## Light theme + # textLight = "#1d2d35" # "#1d2d35" (default), "#1d2d35" (orignal), or custom color + # accentLight = "#8ed6fb" # "#8ed6fb" (default), "#8ed6fb" (orignal), or custom color + + # [doks.menu] + # [doks.menu.section] + # auto = true # true (default) or false + # collapsibleSidebar = true # true (default) or false + +# Debug +[render_hooks.image] + errorLevel = 'ignore' # ignore (default), warning, or error (fails the build) + +[render_hooks.link] + errorLevel = 'ignore' # ignore (default), warning, or error (fails the build) + highlightBroken = false # true or false (default) + +# Images (@thulite/images) +[thulite_images] + [thulite_images.defaults] + decoding = "async" # sync, async, or auto (default) + fetchpriority = "auto" # high, low, or auto (default) + loading = "lazy" # eager or lazy (default) + widths = [480, 576, 768, 1025, 1200, 1440] # [640, 768, 1024, 1366, 1600, 1920] for example + sizes = "auto" # 100vw (default), 75vw, or auto for example + process = "" # "fill 1600x900" or "fill 2100x900" for example + lqip = "16x webp q20" # "16x webp q20" or "21x webp q20" for example + +# Inline SVG (@thulite/inline-svg) +[inline_svg] + iconSetDir = "tabler-icons" # "tabler-icons" (default) + +# SEO (@thulite/seo) +[seo] + [seo.title] + separator = " | " + suffix = "" + [seo.favicons] + sizes = [] + icon = "favicon.png" # favicon.png (default) + svgIcon = "favicon.svg" # favicon.svg (default) + maskIcon = "mask-icon.svg" # mask-icon.svg (default) + maskIconColor = "white" # white (default) + [seo.schemas] + type = "Organization" # Organization (default) or Person + logo = "favicon-512x512.png" # Logo of Organization — favicon-512x512.png (default) + name = "Thulite" # Name of Organization or Person + sameAs = [] # E.g. ["https://github.com/thuliteio/thulite", "https://fosstodon.org/@thulite"] + images = ["cover.png"] # ["cover.png"] (default) + article = [] # Article sections + newsArticle = [] # NewsArticle sections + blogPosting = ["blog"] # BlogPosting sections + product = [] # Product sections diff --git a/web/config/babel.config.js b/web/config/babel.config.js index 9a65c09a6..8482b9c15 100644 --- a/web/config/babel.config.js +++ b/web/config/babel.config.js @@ -1,17 +1,17 @@ -module.exports = { - presets: [ - [ - '@babel/preset-env', - { - targets: { - browsers: [ - // Best practice: https://github.com/babel/babel/issues/7789 - '>=1%', - 'not ie 11', - 'not op_mini all' - ] - } - } - ] - ] -}; +module.exports = { + presets: [ + [ + '@babel/preset-env', + { + targets: { + browsers: [ + // Best practice: https://github.com/babel/babel/issues/7789 + '>=1%', + 'not ie 11', + 'not op_mini all' + ] + } + } + ] + ] +}; diff --git a/web/config/next/hugo.toml b/web/config/next/hugo.toml index 8821061ae..8d1b518e7 100644 --- a/web/config/next/hugo.toml +++ b/web/config/next/hugo.toml @@ -1,2 +1,2 @@ -# Overrides for next environment -baseurl = "/" +# Overrides for next environment +baseurl = "/" diff --git a/web/config/postcss.config.js b/web/config/postcss.config.js index 296b090f2..e4d8f1fee 100644 --- a/web/config/postcss.config.js +++ b/web/config/postcss.config.js @@ -1,64 +1,64 @@ -const autoprefixer = require('autoprefixer'); -const purgecss = require('@fullhuman/postcss-purgecss'); -const whitelister = require('purgecss-whitelister'); - -module.exports = { - plugins: [ - autoprefixer(), - purgecss({ - content: ['./hugo_stats.json'], - extractors: [ - { - extractor: (content) => { - const els = JSON.parse(content).htmlElements; - return els.tags.concat(els.classes, els.ids); - }, - extensions: ['json'] - } - ], - dynamicAttributes: [ - 'aria-expanded', - 'data-bs-popper', - 'data-bs-target', - 'data-bs-theme', - 'data-dark-mode', - 'data-global-alert', - 'data-pane', // tabs.js - 'data-popper-placement', - 'data-sizes', - 'data-toggle-tab', // tabs.js - 'id', - 'size', - 'type' - ], - safelist: [ - 'active', - 'btn-clipboard', // clipboards.js - 'clipboard', // clipboards.js - 'disabled', - 'hidden', - 'modal-backdrop', // search-modal.js - 'selected', // search-modal.js - 'show', - 'img-fluid', - 'blur-up', - 'lazyload', - 'lazyloaded', - 'alert-link', - 'container-fw ', - 'container-lg', - 'container-fluid', - 'offcanvas-backdrop', - 'figcaption', - 'dt', - 'dd', - 'showing', - 'hiding', - 'page-item', - 'page-link', - 'not-content', - ...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']) - ] - }) - ] -}; +const autoprefixer = require('autoprefixer'); +const purgecss = require('@fullhuman/postcss-purgecss'); +const whitelister = require('purgecss-whitelister'); + +module.exports = { + plugins: [ + autoprefixer(), + purgecss({ + content: ['./hugo_stats.json'], + extractors: [ + { + extractor: (content) => { + const els = JSON.parse(content).htmlElements; + return els.tags.concat(els.classes, els.ids); + }, + extensions: ['json'] + } + ], + dynamicAttributes: [ + 'aria-expanded', + 'data-bs-popper', + 'data-bs-target', + 'data-bs-theme', + 'data-dark-mode', + 'data-global-alert', + 'data-pane', // tabs.js + 'data-popper-placement', + 'data-sizes', + 'data-toggle-tab', // tabs.js + 'id', + 'size', + 'type' + ], + safelist: [ + 'active', + 'btn-clipboard', // clipboards.js + 'clipboard', // clipboards.js + 'disabled', + 'hidden', + 'modal-backdrop', // search-modal.js + 'selected', // search-modal.js + 'show', + 'img-fluid', + 'blur-up', + 'lazyload', + 'lazyloaded', + 'alert-link', + 'container-fw ', + 'container-lg', + 'container-fluid', + 'offcanvas-backdrop', + 'figcaption', + 'dt', + 'dd', + 'showing', + 'hiding', + 'page-item', + 'page-link', + 'not-content', + ...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']) + ] + }) + ] +}; diff --git a/web/config/production/hugo.toml b/web/config/production/hugo.toml index 25b668397..575f19241 100644 --- a/web/config/production/hugo.toml +++ b/web/config/production/hugo.toml @@ -1,2 +1,2 @@ -# Overrides for production environment -baseurl = "/" +# Overrides for production environment +baseurl = "/" diff --git a/web/layouts/index.html b/web/layouts/index.html index 4de5d748e..27f1f6ba5 100644 --- a/web/layouts/index.html +++ b/web/layouts/index.html @@ -1,63 +1,63 @@ -{{ define "main" }} -
-
-
-

{{ .Title }}

-
-
-

{{ .Params.lead | safeHTML }}

- Learn More - {{ .Content }} -
-
-
-{{ end }} - -{{ define "sidebar-prefooter" }} - {{ if site.Params.doks.backgroundDots -}} -
-
-
- {{ end -}} - {{ if eq $.Site.Language.LanguageName "English" }} -
-
-
-
-

Composable and Modular by Design

-

Snix is architected with a focus on composability. Different components representing different aspects of Nix can be combined and extended freely, allowing it to be tailored to your usecase.

-
-
-

Library-first Approach

-

Designed to be embedded in your project, it opens up the possibility to interact with Nix expressions and concepts more natively than conventional Nix CLI-based tools.

-
-
-

Robust Unit Test Coverage

-

Snix has a strong commitment to reliability and compatibility with Nix' behaviour, resulting in an extensive test suite, documentation and regression testing.

-
-
-

Content-addressed Storage model

-

With its own content-addressed storage engine, Snix can store and exchange store path contents in a much more granular fashion, while providing great deduplication, consistency and integrity across build artifacts and dependencies.

-
-
-

Interoperability with Nix

-

While potentially doing thing differently underneath, it provides a "Nix-compatible surface". This results in nixpkgs compatibility, allowing to produce the same build expressions as Nix, bit-by-bit, and interoperability with existing Nix binary caches.

-
-
-
-
- {{ end }} -{{ end }} - -{{ define "sidebar-footer" }} -{{ if site.Params.doks.sectionFooter -}} -
-
-
-

Start building with Doks today

- {{ i18n "get-started" }} -
-
-
-{{ end -}} -{{ end }} +{{ define "main" }} +
+
+
+

{{ .Title }}

+
+
+

{{ .Params.lead | safeHTML }}

+ Learn More + {{ .Content }} +
+
+
+{{ end }} + +{{ define "sidebar-prefooter" }} + {{ if site.Params.doks.backgroundDots -}} +
+
+
+ {{ end -}} + {{ if eq $.Site.Language.LanguageName "English" }} +
+
+
+
+

Composable and Modular by Design

+

Snix is architected with a focus on composability. Different components representing different aspects of Nix can be combined and extended freely, allowing it to be tailored to your usecase.

+
+
+

Library-first Approach

+

Designed to be embedded in your project, it opens up the possibility to interact with Nix expressions and concepts more natively than conventional Nix CLI-based tools.

+
+
+

Robust Unit Test Coverage

+

Snix has a strong commitment to reliability and compatibility with Nix' behaviour, resulting in an extensive test suite, documentation and regression testing.

+
+
+

Content-addressed Storage model

+

With its own content-addressed storage engine, Snix can store and exchange store path contents in a much more granular fashion, while providing great deduplication, consistency and integrity across build artifacts and dependencies.

+
+
+

Interoperability with Nix

+

While potentially doing thing differently underneath, it provides a "Nix-compatible surface". This results in nixpkgs compatibility, allowing to produce the same build expressions as Nix, bit-by-bit, and interoperability with existing Nix binary caches.

+
+
+
+
+ {{ end }} +{{ end }} + +{{ define "sidebar-footer" }} +{{ if site.Params.doks.sectionFooter -}} +
+
+
+

Start building with Doks today

+ {{ i18n "get-started" }} +
+
+
+{{ end -}} +{{ end }} diff --git a/web/layouts/partials/footer/script-footer-custom.html b/web/layouts/partials/footer/script-footer-custom.html index 4411a7079..d570e83e8 100644 --- a/web/layouts/partials/footer/script-footer-custom.html +++ b/web/layouts/partials/footer/script-footer-custom.html @@ -1,13 +1,13 @@ -{{/* Put your custom tags here */}} - -{{/* EXAMPLE - only load script for production -{{ if eq (hugo.Environment) "production" -}} - {{ partial "footer/esbuild" (dict "src" "js/instantpage.js" "load" "async" "transpile" false) -}} -{{ end -}} -*/}} - -{{/* EXAMPLE - only load script for a page type e.g. contact or gallery -{{ if eq .Type "gallery" -}} - {{ partial "footer/esbuild" (dict "src" "js/gallery.js" "load" "async" "transpile" false) -}} -{{ end -}} -*/}} +{{/* Put your custom tags here */}} + +{{/* EXAMPLE - only load script for production +{{ if eq (hugo.Environment) "production" -}} + {{ partial "footer/esbuild" (dict "src" "js/instantpage.js" "load" "async" "transpile" false) -}} +{{ end -}} +*/}} + +{{/* EXAMPLE - only load script for a page type e.g. contact or gallery +{{ if eq .Type "gallery" -}} + {{ partial "footer/esbuild" (dict "src" "js/gallery.js" "load" "async" "transpile" false) -}} +{{ end -}} +*/}} diff --git a/web/layouts/partials/head/custom-head.html b/web/layouts/partials/head/custom-head.html index 21e7beaf3..0c59d7ffb 100644 --- a/web/layouts/partials/head/custom-head.html +++ b/web/layouts/partials/head/custom-head.html @@ -1 +1 @@ - + diff --git a/web/layouts/partials/head/script-header.html b/web/layouts/partials/head/script-header.html index aba98029e..ae068e302 100644 --- a/web/layouts/partials/head/script-header.html +++ b/web/layouts/partials/head/script-header.html @@ -1 +1 @@ - + diff --git a/web/netlify.toml b/web/netlify.toml index fca7810dd..fbda65b7a 100644 --- a/web/netlify.toml +++ b/web/netlify.toml @@ -1,49 +1,49 @@ -[build] - publish = "public" - functions = "functions" - -[build.environment] - NODE_VERSION = "20.11.0" - NPM_VERSION = "10.2.4" - HUGO_VERSION = "0.125.1" - -[context.production] - command = "npm run build" - -[context.deploy-preview] - command = "npm run build" - -[context.branch-deploy] - command = "npm run build" - -[context.next] - command = "npm run build" - -[context.next.environment] - HUGO_ENV = "next" - -[dev] - framework = "#custom" - command = "npm run dev" - targetPort = 1313 - port = 8888 - publish = "public" - autoLaunch = false - -# Redirects and rewrites — https://docs.netlify.com/routing/redirects/#syntax-for-the-netlify-configuration-file - -# Custom headers — https://docs.netlify.com/routing/headers/#syntax-for-the-netlify-configuration-file -[[headers]] - for = "/*" - [headers.values] - Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload" - X-Content-Type-Options = "nosniff" - X-XSS-Protection = "1; mode=block" - Content-Security-Policy = "default-src 'self'; manifest-src 'self'; connect-src 'self'; font-src 'self'; img-src 'self' https://avatars.githubusercontent.com data:; script-src 'self' 'nonce-dXNlcj0iaGVsbG8iLGRvbWFpbj0iaGVua3ZlcmxpbmRlLmNvbSIsZG9jdW1lbnQud3JpdGUodXNlcisiQCIrZG9tYWluKTs=' 'sha256-aWZ3y/RxbBYKHXH0z8+8ljrHG1mSBvyzSfxSMjBSaXk='; style-src 'self'" - X-Frame-Options = "SAMEORIGIN" - Referrer-Policy = "strict-origin" - Permissions-Policy = "geolocation=(self), microphone=(), camera=()" - Cache-Control= ''' - public, - max-age=31536000''' - Access-Control-Allow-Origin = "*" +[build] + publish = "public" + functions = "functions" + +[build.environment] + NODE_VERSION = "20.11.0" + NPM_VERSION = "10.2.4" + HUGO_VERSION = "0.125.1" + +[context.production] + command = "npm run build" + +[context.deploy-preview] + command = "npm run build" + +[context.branch-deploy] + command = "npm run build" + +[context.next] + command = "npm run build" + +[context.next.environment] + HUGO_ENV = "next" + +[dev] + framework = "#custom" + command = "npm run dev" + targetPort = 1313 + port = 8888 + publish = "public" + autoLaunch = false + +# Redirects and rewrites — https://docs.netlify.com/routing/redirects/#syntax-for-the-netlify-configuration-file + +# Custom headers — https://docs.netlify.com/routing/headers/#syntax-for-the-netlify-configuration-file +[[headers]] + for = "/*" + [headers.values] + Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload" + X-Content-Type-Options = "nosniff" + X-XSS-Protection = "1; mode=block" + Content-Security-Policy = "default-src 'self'; manifest-src 'self'; connect-src 'self'; font-src 'self'; img-src 'self' https://avatars.githubusercontent.com data:; script-src 'self' 'nonce-dXNlcj0iaGVsbG8iLGRvbWFpbj0iaGVua3ZlcmxpbmRlLmNvbSIsZG9jdW1lbnQud3JpdGUodXNlcisiQCIrZG9tYWluKTs=' 'sha256-aWZ3y/RxbBYKHXH0z8+8ljrHG1mSBvyzSfxSMjBSaXk='; style-src 'self'" + X-Frame-Options = "SAMEORIGIN" + Referrer-Policy = "strict-origin" + Permissions-Policy = "geolocation=(self), microphone=(), camera=()" + Cache-Control= ''' + public, + max-age=31536000''' + Access-Control-Allow-Origin = "*"