Compare commits

...

31 Commits

Author SHA1 Message Date
Mark Dumay
2625222554 Merge pull request #1538 from gethinode/develop
feat: add link button to toggle TOC items
2025-08-15 10:00:54 +02:00
Mark Dumay
74eeec9030 Merge branch 'main' into develop 2025-08-15 09:53:29 +02:00
Mark Dumay
a57e0da164 feat: add link button to toggle TOC items 2025-08-15 09:52:20 +02:00
github-actions[bot]
6ab01755f2 Merge pull request #1537 from gethinode/dependabot/npm_and_yarn/cpy-cli-6.0.0
build(deps-dev): bump cpy-cli from 5.0.0 to 6.0.0
2025-08-13 13:51:27 +00:00
dependabot[bot]
22cb71ca9b build(deps-dev): bump cpy-cli from 5.0.0 to 6.0.0
Bumps [cpy-cli](https://github.com/sindresorhus/cpy-cli) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/sindresorhus/cpy-cli/releases)
- [Commits](https://github.com/sindresorhus/cpy-cli/compare/v5.0.0...v6.0.0)

---
updated-dependencies:
- dependency-name: cpy-cli
  dependency-version: 6.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-13 13:45:14 +00:00
Mark Dumay
62897f685f Merge pull request #1535 from gethinode/codeql
ci: use advanced codeql config
2025-08-12 09:35:18 +02:00
Mark Dumay
4f8fdc4f03 ci: fix codeql config path 2025-08-12 09:28:05 +02:00
Mark Dumay
925a3ff33e ci: specify codeql paths to scan 2025-08-12 09:25:06 +02:00
Mark Dumay
cf16cb9824 ci: use advanced codeql config 2025-08-12 08:22:40 +02:00
Mark Dumay
5d9383858f Merge pull request #1534 from gethinode/develop
fix: adjust horizontal alignment of cards
2025-08-12 08:04:14 +02:00
Mark Dumay
3332b437dd Merge branch 'main' into develop 2025-08-12 07:56:55 +02:00
github-actions[bot]
c5510707b1 Merge pull request #1532 from gethinode/dependabot/github_actions/actions/checkout-5
build(deps): bump actions/checkout from 4 to 5
2025-08-12 04:35:12 +00:00
Mark Dumay
498f208382 Merge branch 'main' into dependabot/github_actions/actions/checkout-5 2025-08-12 06:28:55 +02:00
Mark Dumay
86962eb8a2 fix: adjust horizontal alignment of cards
fixes #1533
2025-08-12 06:28:33 +02:00
dependabot[bot]
f4319180e0 build(deps): bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-11 20:45:50 +00:00
github-actions[bot]
9607aef8ef Merge pull request #1531 from gethinode/dependabot/npm_and_yarn/eslint-9.33.0
build(deps-dev): bump eslint from 9.32.0 to 9.33.0
2025-08-11 18:21:09 +00:00
dependabot[bot]
2c2f150faa build(deps-dev): bump eslint from 9.32.0 to 9.33.0
Bumps [eslint](https://github.com/eslint/eslint) from 9.32.0 to 9.33.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.32.0...v9.33.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.33.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-11 18:13:53 +00:00
github-actions[bot]
6087630643 Merge pull request #1529 from gethinode/dependabot/npm_and_yarn/stylelint-16.23.1
build(deps-dev): bump stylelint from 16.23.0 to 16.23.1
2025-08-08 14:07:49 +00:00
dependabot[bot]
26235a1e7e build(deps-dev): bump stylelint from 16.23.0 to 16.23.1
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.23.0 to 16.23.1.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.23.0...16.23.1)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-version: 16.23.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-08 13:59:57 +00:00
Mark Dumay
408799c3e2 Merge pull request #1528 from gethinode/develop
feat: enable customization of content blocks rendering
2025-08-06 14:27:38 +02:00
Mark Dumay
7b4a46121c Merge branch 'main' into develop 2025-08-06 14:18:01 +02:00
Mark Dumay
7af4c37c88 feat: enable customization of content blocks rendering 2025-08-06 14:17:34 +02:00
Mark Dumay
9cc7174030 Merge pull request #1527 from gethinode/develop
Develop
2025-08-06 09:13:55 +02:00
Mark Dumay
f8de99173f feat: enable global site robots config 2025-08-06 08:58:47 +02:00
Mark Dumay
68f7b466fb fix: improve aria handling of modal messages 2025-08-06 08:58:27 +02:00
github-actions[bot]
3a9a57cc5d Merge pull request #1526 from gethinode/dependabot/npm_and_yarn/stylelint-16.23.0
build(deps-dev): bump stylelint from 16.22.0 to 16.23.0
2025-07-29 14:07:10 +00:00
dependabot[bot]
f3c264ead2 build(deps-dev): bump stylelint from 16.22.0 to 16.23.0
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.22.0 to 16.23.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.22.0...16.23.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-version: 16.23.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-29 13:59:51 +00:00
github-actions[bot]
1dd2971893 Merge pull request #1525 from gethinode/dependabot/npm_and_yarn/eslint-9.32.0
build(deps-dev): bump eslint from 9.31.0 to 9.32.0
2025-07-28 18:04:51 +00:00
dependabot[bot]
7ac6b89ece build(deps-dev): bump eslint from 9.31.0 to 9.32.0
Bumps [eslint](https://github.com/eslint/eslint) from 9.31.0 to 9.32.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.31.0...v9.32.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.32.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-28 17:59:30 +00:00
github-actions[bot]
458e8fb605 Merge pull request #1524 from gethinode/dependabot/npm_and_yarn/hugo-bin-0.145.2
build(deps): bump hugo-bin from 0.145.1 to 0.145.2
2025-07-28 17:54:34 +00:00
dependabot[bot]
b268c1bad0 build(deps): bump hugo-bin from 0.145.1 to 0.145.2
Bumps [hugo-bin](https://github.com/fenneclab/hugo-bin) from 0.145.1 to 0.145.2.
- [Release notes](https://github.com/fenneclab/hugo-bin/releases)
- [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.145.1...v0.145.2)

---
updated-dependencies:
- dependency-name: hugo-bin
  dependency-version: 0.145.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-28 17:49:07 +00:00
22 changed files with 621 additions and 622 deletions

8
.github/codeql/codeql-config.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
paths:
- 'assets/js'
paths-ignore:
- '**/vendor'
- '**/critical/languageSelector.js'
- '**/critical/color.js'
- '**/navbar.js'
- '**/sharing.js'

102
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,102 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '44 1 * * 3'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config-file: ./.github/codeql/codeql-config.yml
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

View File

@@ -24,7 +24,7 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v4
@@ -53,7 +53,7 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install Go
uses: actions/setup-go@v5

View File

@@ -14,7 +14,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v4

View File

@@ -23,7 +23,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

6
assets/js/modal.js Normal file
View File

@@ -0,0 +1,6 @@
document.addEventListener('hide.bs.modal', function (event) {
// Remove the focus from the active element
if (document.activeElement) {
document.activeElement.blur()
}
})

13
assets/js/toc.js Normal file
View File

@@ -0,0 +1,13 @@
const btnTOCShowMore = document.getElementById('btnTOCShowMore')
if (btnTOCShowMore !== null) {
btnTOCShowMore.addEventListener('click', (e) => {
btnTOCShowMore.style.display = 'none'
})
}
const btnTOCShowLess = document.getElementById('btnTOCShowLess')
if ((btnTOCShowLess !== null) && (btnTOCShowMore !== null)) {
btnTOCShowLess.addEventListener('click', (e) => {
btnTOCShowMore.style.display = 'initial'
})
}

View File

@@ -74,6 +74,14 @@
}
}
.btn-link.toc-item {
font-size: inherit;
}
#btnTOCShowMore {
padding-top: 0.875rem;
}
a.toc-item {
display: block;
}

View File

@@ -97,6 +97,9 @@
toc = true
sidebar = true
size = "md"
startLevel = 2
endLevel = 3
maxNumHeadings = 9
[navigation.padding]
x = 4
y = 4

View File

@@ -51,6 +51,9 @@
toc = true
sidebar = true
size = "md"
startLevel = 2
endLevel = 3
maxNumHeadings = 9
[navigation.padding]
x = 4
y = 4

View File

@@ -616,6 +616,8 @@
"body-file-collapse-1",
"bouton",
"breadcrumb",
"btnTOCShowLess",
"btnTOCShowMore",
"button",
"button-group",
"c4-diagram",
@@ -642,11 +644,11 @@
"docs",
"documentation",
"dropdown-nav-0",
"dropdown-panel-3db1162c8e923c363f53cdd77b3941dd",
"dropdown-panel-3eb793f32a8332bf0f1580c4e0ee1af9",
"dropdown-panel-a63cbde071d2b7909cdc915a407fc84a",
"dropdown-panel-f3fb705824de1effb0fde452a156be28",
"dropdown-panel-ff2a4aaf767d9d92977e27a5929980db",
"dropdown-panel-084bf092239e5f25a71841b46134e2b5",
"dropdown-panel-09e05d29554c47c7d092c3c332e8ab42",
"dropdown-panel-5acf6806020477b731604b7c3506126d",
"dropdown-panel-6bdf123559ba44e375634c7e5392b912",
"dropdown-panel-d09398439fd994d4aafbc4a3a9c28bf2",
"elements-type",
"entity-relationship-diagram",
"example",
@@ -664,11 +666,11 @@
"fab-medium",
"fab-whatsapp",
"fab-x-twitter",
"faq-fbb18b868ab666e41e781424cfa7856e",
"faq-fbb18b868ab666e41e781424cfa7856e-heading-faq-fbb18b868ab666e41e781424cfa7856e",
"faq-fbb18b868ab666e41e781424cfa7856e-item-0",
"faq-fbb18b868ab666e41e781424cfa7856e-item-1",
"faq-fbb18b868ab666e41e781424cfa7856e-item-2",
"faq-c3e9e2ab69a8c88825f39038d15bc04f",
"faq-c3e9e2ab69a8c88825f39038d15bc04f-heading-faq-c3e9e2ab69a8c88825f39038d15bc04f",
"faq-c3e9e2ab69a8c88825f39038d15bc04f-item-0",
"faq-c3e9e2ab69a8c88825f39038d15bc04f-item-1",
"faq-c3e9e2ab69a8c88825f39038d15bc04f-item-2",
"fas-1",
"fas-2",
"fas-3",
@@ -760,11 +762,11 @@
"nav-0-btn-1",
"nav-0-btn-2",
"nav-nav-0",
"nav-panel-3db1162c8e923c363f53cdd77b3941dd",
"nav-panel-3eb793f32a8332bf0f1580c4e0ee1af9",
"nav-panel-a63cbde071d2b7909cdc915a407fc84a",
"nav-panel-f3fb705824de1effb0fde452a156be28",
"nav-panel-ff2a4aaf767d9d92977e27a5929980db",
"nav-panel-084bf092239e5f25a71841b46134e2b5",
"nav-panel-09e05d29554c47c7d092c3c332e8ab42",
"nav-panel-5acf6806020477b731604b7c3506126d",
"nav-panel-6bdf123559ba44e375634c7e5392b912",
"nav-panel-d09398439fd994d4aafbc4a3a9c28bf2",
"navbar",
"navbar-0-collapse",
"navbar-mode",
@@ -773,36 +775,36 @@
"navigation",
"notification",
"overview",
"panel-3db1162c8e923c363f53cdd77b3941dd-0",
"panel-3db1162c8e923c363f53cdd77b3941dd-1",
"panel-3db1162c8e923c363f53cdd77b3941dd-2",
"panel-3db1162c8e923c363f53cdd77b3941dd-btn-0",
"panel-3db1162c8e923c363f53cdd77b3941dd-btn-1",
"panel-3db1162c8e923c363f53cdd77b3941dd-btn-2",
"panel-3eb793f32a8332bf0f1580c4e0ee1af9-0",
"panel-3eb793f32a8332bf0f1580c4e0ee1af9-1",
"panel-3eb793f32a8332bf0f1580c4e0ee1af9-2",
"panel-3eb793f32a8332bf0f1580c4e0ee1af9-btn-0",
"panel-3eb793f32a8332bf0f1580c4e0ee1af9-btn-1",
"panel-3eb793f32a8332bf0f1580c4e0ee1af9-btn-2",
"panel-a63cbde071d2b7909cdc915a407fc84a-0",
"panel-a63cbde071d2b7909cdc915a407fc84a-1",
"panel-a63cbde071d2b7909cdc915a407fc84a-2",
"panel-a63cbde071d2b7909cdc915a407fc84a-btn-0",
"panel-a63cbde071d2b7909cdc915a407fc84a-btn-1",
"panel-a63cbde071d2b7909cdc915a407fc84a-btn-2",
"panel-f3fb705824de1effb0fde452a156be28-0",
"panel-f3fb705824de1effb0fde452a156be28-1",
"panel-f3fb705824de1effb0fde452a156be28-2",
"panel-f3fb705824de1effb0fde452a156be28-btn-0",
"panel-f3fb705824de1effb0fde452a156be28-btn-1",
"panel-f3fb705824de1effb0fde452a156be28-btn-2",
"panel-ff2a4aaf767d9d92977e27a5929980db-0",
"panel-ff2a4aaf767d9d92977e27a5929980db-1",
"panel-ff2a4aaf767d9d92977e27a5929980db-2",
"panel-ff2a4aaf767d9d92977e27a5929980db-btn-0",
"panel-ff2a4aaf767d9d92977e27a5929980db-btn-1",
"panel-ff2a4aaf767d9d92977e27a5929980db-btn-2",
"panel-084bf092239e5f25a71841b46134e2b5-0",
"panel-084bf092239e5f25a71841b46134e2b5-1",
"panel-084bf092239e5f25a71841b46134e2b5-2",
"panel-084bf092239e5f25a71841b46134e2b5-btn-0",
"panel-084bf092239e5f25a71841b46134e2b5-btn-1",
"panel-084bf092239e5f25a71841b46134e2b5-btn-2",
"panel-09e05d29554c47c7d092c3c332e8ab42-0",
"panel-09e05d29554c47c7d092c3c332e8ab42-1",
"panel-09e05d29554c47c7d092c3c332e8ab42-2",
"panel-09e05d29554c47c7d092c3c332e8ab42-btn-0",
"panel-09e05d29554c47c7d092c3c332e8ab42-btn-1",
"panel-09e05d29554c47c7d092c3c332e8ab42-btn-2",
"panel-5acf6806020477b731604b7c3506126d-0",
"panel-5acf6806020477b731604b7c3506126d-1",
"panel-5acf6806020477b731604b7c3506126d-2",
"panel-5acf6806020477b731604b7c3506126d-btn-0",
"panel-5acf6806020477b731604b7c3506126d-btn-1",
"panel-5acf6806020477b731604b7c3506126d-btn-2",
"panel-6bdf123559ba44e375634c7e5392b912-0",
"panel-6bdf123559ba44e375634c7e5392b912-1",
"panel-6bdf123559ba44e375634c7e5392b912-2",
"panel-6bdf123559ba44e375634c7e5392b912-btn-0",
"panel-6bdf123559ba44e375634c7e5392b912-btn-1",
"panel-6bdf123559ba44e375634c7e5392b912-btn-2",
"panel-d09398439fd994d4aafbc4a3a9c28bf2-0",
"panel-d09398439fd994d4aafbc4a3a9c28bf2-1",
"panel-d09398439fd994d4aafbc4a3a9c28bf2-2",
"panel-d09398439fd994d4aafbc4a3a9c28bf2-btn-0",
"panel-d09398439fd994d4aafbc4a3a9c28bf2-btn-1",
"panel-d09398439fd994d4aafbc4a3a9c28bf2-btn-2",
"persona",
"pie-chart",
"pills",
@@ -839,6 +841,7 @@
"toast-example-2",
"toast-message-email-4",
"toc-collapse",
"toc-collapse-items",
"tooltip",
"types-de-cookies-que-nous-utilisons",
"types-of-cookies-we-use",

View File

@@ -166,7 +166,6 @@
"row-cols-1",
"row-cols-2",
"row-cols-sm-3",
"script",
"search",
"search-input",
"search-suggestions",

View File

@@ -101,6 +101,10 @@
translation: "See also"
- id: sectionMenu
translation: "Select a topic"
- id: tocShowMore
translation: "Show {{ . }} more"
- id: tocShowLess
translation: "Show less"
# Sidebar
- id: toggleSidebar

View File

@@ -99,6 +99,10 @@
translation: "Zie ook"
- id: sectionMenu
translation: "Selecteer een onderwerp"
- id: tocShowMore
translation: "Toon {{ . }} meer"
- id: tocShowLess
translation: "Toon minder"
# Sidebar
- id: toggleSidebar

View File

@@ -168,7 +168,7 @@
-}}
{{/* Main code */}}
{{ if or (ne $args.gutter "0") ($args.wrapper) }}<div class="g-{{ $args.gutter }} {{ $args.wrapper }} h-100">{{ end }}
{{ if or (gt $args.gutter "0") ($args.wrapper) }}<div class="{{ with $args.gutter }}g-{{ . }}{{ end }} {{ $args.wrapper }}">{{ end }}
{{ $stack := "" }}
@@ -301,4 +301,4 @@
</div>
{{- end -}}
{{ if or (ne $args.gutter "0") ($args.wrapper) }}</div>{{ end }}
{{ if or (gt $args.gutter "0") ($args.wrapper) }}</div>{{ end }}

View File

@@ -1,107 +1,88 @@
{{- /*
Copyright 2023 Veriphor, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/}}
{{- /*
Renders a table of contents by parsing rendered content.
In site configuration, set the default start level, end level, and the minimum
number of headings required to show the table of contents:
[params.toc]
startLevel = 2 # default is 2
endLevel = 3 # default is 3
minNumHeadings = 2 # default is 2
To display the table of contents on a page:
+++
title = 'Post 1'
toc = true
+++
To display the table of contents on a page, and override one or more of the
default settings:
+++
title = 'Post 1'
[toc]
startLevel = 2 # default is 2
endLevel = 3 # default is 3
minNumHeadings = 2 # default is 2
+++
Change or localize the title with a "toc_title" key in your i18n file(s).
Start with these basic CSS rules to style the table of contents:
a.toc-item {
display: block;
}
a.toc-level-1 {
margin-left: 0em;
}
a.toc-level-2 {
margin-left: 1em;
}
a.toc-level-3 {
margin-left: 2em;
}
a.toc-level-4 {
margin-left: 3em;
}
a.toc-level-5 {
margin-left: 4em;
}
a.toc-level-6 {
margin-left: 5em;
}
@context {page} .
@returns {template.HTML}
@example {{ partial "toc-parse-content.html" . }}
*/}}
{{- /* Get configuration. */}}
{{- $startLevel := or (.Site.Params.navigation.startLevel | int) 2 }}
{{- $endLevel := or (.Site.Params.navigation.endLevel | int) 3 }}
{{- $minNumHeadings := or (.Site.Params.navigation.minNumHeadings | int) 2 }}
{{- /* Initialize. */}}
{{ $headings := partial "assets/toc-headings.html" . }}
{{- /* Render */}}
{{- if .Site.Params.navigation.toc }}
{{- with $headings }}
{{- if ge (len .) $minNumHeadings }}
<strong class="d-block h6 my-2 pt-4">{{ T "toc" }}:</strong>
<nav class="toc">
{{- range . }}
{{- $attrs := dict "class" (printf "toc-item toc-level-%d" (add 1 (sub .level $startLevel))) }}
{{- with .id }}
{{- $attrs = merge $attrs (dict "href" (printf "%s#%s" $.RelPermalink .)) }}
{{- end }}
<a
{{- range $k, $v := $attrs }}
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
{{- end -}}
>{{ .text }}</a>
{{- end }}
</nav>
{{- end }}
{{- end }}
{{- end }}
{{/*
Copyright © 2025 The Hinode Team / Mark Dumay. All rights reserved.
Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
Visit gethinode.com/license for more details.
*/}}
{{ define "_partials/inline/toc-item.html" }}
{{ $base := .base }}
{{ $startLevel := .startLevel }}
{{ $endLevel := .endLevel }}
{{ $item := .item }}
{{ $maxNumHeadings := .maxNumHeadings }}
{{ $result := .result | default slice }}
{{ if and (ge $item.Level $startLevel) (le $item.Level $endLevel) }}
{{- $attrs := dict "class" (printf "toc-item toc-level-%d" (add 1 (sub $item.Level $startLevel))) }}
{{- with $item.ID }}
{{- $attrs = merge $attrs (dict "href" (printf "%s#%s" $base .)) }}
{{- end }}
{{ $htmlAttr := "" }}
{{ range $k, $v := $attrs }}{{ $htmlAttr = printf "%s %s=%q" $htmlAttr $k $v | safeHTMLAttr }}{{ end }}
{{ $rendered := printf "<a %s>%s</a>" $htmlAttr $item.Title }}
{{ $result = $result | append $rendered }}
{{ end }}
{{ range $item.Headings }}
{{ $result = $result | append (partial "inline/toc-item.html" (dict
"base" $base
"item" .
"startLevel" $startLevel
"endLevel" $endLevel
"maxNumHeadings" $maxNumHeadings
)) }}
{{ end }}
{{ return $result }}
{{ end }}
{{- /* Get configuration. */}}
{{- $startLevel := or (.Site.Params.navigation.startLevel | int) 2 }}
{{- $endLevel := or (.Site.Params.navigation.endLevel | int) 3 }}
{{- $minNumHeadings := or (.Site.Params.navigation.minNumHeadings | int) 2 }}
{{- $maxNumHeadings := or (.Site.Params.navigation.maxNumHeadings | int) 9 }}
{{- /* Render */}}
{{- if and .Site.Params.navigation.toc (ge (len .Fragments.HeadingsMap) $minNumHeadings) }}
<strong class="d-block h6 my-2 pt-4">{{ T "toc" }}:</strong>
<nav class="toc">
{{ $result := slice }}
{{ range .Fragments.Headings }}
{{ $result = $result | append (partial "inline/toc-item.html" (dict
"base" $.RelPermalink
"item" .
"startLevel" $startLevel
"endLevel" $endLevel
"maxNumHeadings" $maxNumHeadings
)) }}
{{ end }}
{{ range $i, $v := $result }}
{{ if eq $i $maxNumHeadings }}
{{ partial "assets/button.html" (dict
"id" "btnTOCShowMore"
"collapse-id" "toc-collapse-items"
"link-type" "link"
"class" "toc-item"
"title" (T "tocShowMore" (sub (len $result) $i))
"spacing" false
) }}
<div class="collapse" id="toc-collapse-items">
{{ end }}
{{ print $v | safeHTML }}
{{ end }}
{{ if gt (len $result) $maxNumHeadings }}
&nbsp;
{{ partial "assets/button.html" (dict
"id" "btnTOCShowLess"
"collapse-id" "toc-collapse-items"
"link-type" "link"
"class" "toc-item"
"title" (T "tocShowLess")
"spacing" false
) }}
</div>{{ end }}
</nav>
{{ end }}

View File

@@ -46,7 +46,7 @@
{{ if eq .Kind "404" -}}
<meta name="robots" content="noindex, follow">
{{ else }}
{{ with or .Params.robots .Params.meta.robots -}}
{{ with or .Params.robots .Params.meta.robots .Site.Params.meta.robots -}}
<meta name="robots" content="{{ . }}">
{{ else -}}
<meta name="robots" content="index, follow">

View File

@@ -23,8 +23,9 @@
{{- /* Define main breakpoint */ -}}
{{- $.Scratch.Set "breakpoint" (partialCached "utilities/GetBreakpoint.html" .) }}
{{- /* Render blocks and establish overlay mode */ -}}
{{- /* Prepare content blocks and establish overlay mode */ -}}
{{ $blocks := partial "utilities/RenderContentBlocks.html" (dict "page" . "blocks" .Params.content_blocks) }}
{{ $.Scratch.Set "blocks" $blocks }}
{{ $overlayMode := $.Scratch.Get "overlayMode" }}
{{- /* Define base URL */ -}}
@@ -51,7 +52,6 @@
-}}
<div id="container" class="main">
{{ $blocks }}
{{ block "main" . }}{{ end -}}
</div>

View File

@@ -1,5 +1,8 @@
{{ define "main" -}}
{{- $breakpoint := $.Scratch.Get "breakpoint" -}}
{{- $blocks := $.Scratch.Get "blocks" -}}
{{ $blocks | safeHTML }}
<div class="container-xxl flex-fill p-4 px-xxl-0">
{{ .Render "body" }}

View File

@@ -1,4 +1,5 @@
{{ define "main" -}}
{{- $blocks := $.Scratch.Get "blocks" -}}
{{- $breakpoint := $.Scratch.Get "breakpoint" -}}
{{- $sidebar := partial "page/sidebar" . -}}
{{- $toc := partial "page/panel-toc" . -}}
@@ -15,6 +16,8 @@
</div>
{{ end }}
{{ $blocks | safeHTML }}
<div class="container-xxl flex-fill p-4 px-xxl-0">
<div class="row row-cols-1 row-cols-{{ $breakpoint.current }}-2 row-cols-{{ $breakpoint.next }}-3">
<div class="col col-{{ $breakpoint.next }}-2 d-none d-{{ $breakpoint.next }}-block sidebar-overflow sticky-top pt-5">

771
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -75,7 +75,7 @@
"autoprefixer": "^10.4.21",
"cssnano": "^7.1.0",
"cssnano-preset-advanced": "^7.0.8",
"hugo-bin": "0.145.1",
"hugo-bin": "0.145.2",
"purgecss-whitelister": "^2.4.0"
},
"devDependencies": {
@@ -85,9 +85,9 @@
"@semantic-release/exec": "^7.1.0",
"@semantic-release/git": "^10.0.1",
"commitizen": "^4.3.1",
"cpy-cli": "^5.0.0",
"cpy-cli": "^6.0.0",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^9.31.0",
"eslint": "^9.33.0",
"husky": "^9.1.7",
"markdownlint-cli2": "^0.18.1",
"neostandard": "^0.12.2",
@@ -98,7 +98,7 @@
"rimraf": "^6.0.1",
"semantic-release": "^24.2.7",
"shx": "^0.4.0",
"stylelint": "^16.22.0",
"stylelint": "^16.23.1",
"stylelint-config-standard-scss": "^15.0.1"
},
"optionalDependencies": {