mirror of
https://github.com/imfing/hextra.git
synced 2025-07-01 13:47:17 -04:00
Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
c3ce3b67e6 | |||
9d57dbd9cd | |||
a2718d8aa3 | |||
2b83a3762f | |||
aad859d72e | |||
6a2f11d780 | |||
662d9202dc | |||
9f9ddd69ab | |||
96b2f6145d | |||
c2286c9dd1 | |||
49b1cd11ee | |||
b2e6c30c7f | |||
8eb348323d | |||
ab56c66ae5 | |||
ddc017b8dc | |||
ce837dca42 | |||
c60d1f5de7 | |||
bbe3c46320 | |||
cb3373d500 | |||
56f28e6f14 |
@ -3,7 +3,7 @@
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/hugo:1": {
|
||||
"extended": true,
|
||||
"version": "0.131.0"
|
||||
"version": "0.145.0"
|
||||
},
|
||||
"ghcr.io/devcontainers/features/node:1": {}
|
||||
},
|
||||
|
2
.github/workflows/pages.yml
vendored
2
.github/workflows/pages.yml
vendored
@ -31,7 +31,7 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
HUGO_VERSION: 0.138.0
|
||||
HUGO_VERSION: 0.145.0
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
@ -584,10 +584,6 @@ video {
|
||||
margin-left: 0.25rem;
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
.hx-mx-2 {
|
||||
margin-left: 0.5rem;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
.hx-mx-4 {
|
||||
margin-left: 1rem;
|
||||
margin-right: 1rem;
|
||||
|
@ -23,6 +23,12 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
document.body.classList.toggle('md:hx-overflow-auto');
|
||||
}
|
||||
|
||||
function hideOverlay() {
|
||||
// Hide the overlay
|
||||
overlay.classList.remove(...overlayClasses);
|
||||
overlay.classList.add('hx-bg-transparent');
|
||||
}
|
||||
|
||||
menu.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
toggleMenu();
|
||||
@ -33,8 +39,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
overlay.classList.remove('hx-bg-transparent');
|
||||
} else {
|
||||
// Hide the overlay
|
||||
overlay.classList.remove(...overlayClasses);
|
||||
overlay.classList.add('hx-bg-transparent');
|
||||
hideOverlay();
|
||||
}
|
||||
});
|
||||
|
||||
@ -43,7 +48,23 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
toggleMenu();
|
||||
|
||||
// Hide the overlay
|
||||
overlay.classList.remove(...overlayClasses);
|
||||
overlay.classList.add('hx-bg-transparent');
|
||||
hideOverlay();
|
||||
});
|
||||
|
||||
// Select all anchor tags in the sidebar container
|
||||
const sidebarLinks = sidebarContainer.querySelectorAll('a');
|
||||
|
||||
// Add click event listener to each anchor tag
|
||||
sidebarLinks.forEach(link => {
|
||||
link.addEventListener('click', (e) => {
|
||||
// Check if the href attribute contains a hash symbol (links to a heading)
|
||||
if (link.getAttribute('href') && link.getAttribute('href').startsWith('#')) {
|
||||
// Only dismiss overlay on mobile view
|
||||
if (window.innerWidth < 768) {
|
||||
toggleMenu();
|
||||
hideOverlay();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -290,3 +290,4 @@ x-twitter: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path f
|
||||
linkedin: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037c-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85c3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065a2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>
|
||||
slack: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52a2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52zm0 1.271a2.528 2.528 0 0 1 2.521 2.521a2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521zm10.122 2.521a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522zm-1.268 0a2.528 2.528 0 0 1-2.523 2.521a2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522zm-2.523 10.122a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522zm0-1.268a2.527 2.527 0 0 1-2.52-2.523a2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523z" /></svg>
|
||||
bluesky: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 530"><path fill="currentColor" d="M136 44c66 50 138 151 164 205 26-54 98-155 164-205 48-36 126-64 126 25 0 18-10 149-16 170-21 74-96 93-163 81 117 20 147 86 82 153-122 125-176-32-189-72-3-8-4-11-4-8 0-3-1 0-4 8-13 40-67 197-189 72-65-67-35-133 82-153-67 12-142-7-163-81-6-21-16-152-16-170 0-89 78-61 126-25z"/></svg>
|
||||
telegram: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M248 8C111.033 8 0 119.033 0 256s111.033 248 248 248 248-111.033 248-248S384.967 8 248 8m114.952 168.66c-3.732 39.215-19.881 134.378-28.1 178.3-3.476 18.584-10.322 24.816-16.948 25.425-14.4 1.326-25.338-9.517-39.287-18.661-21.827-14.308-34.158-23.215-55.346-37.177-24.485-16.135-8.612-25 5.342-39.5 3.652-3.793 67.107-61.51 68.335-66.746.153-.655.3-3.1-1.154-4.384s-3.59-.849-5.135-.5q-3.283.746-104.608 69.142-14.845 10.194-26.894 9.934c-8.855-.191-25.888-5.006-38.551-9.123-15.531-5.048-27.875-7.717-26.8-16.291q.84-6.7 18.45-13.7 108.446-47.248 144.628-62.3c68.872-28.647 83.183-33.623 92.511-33.789 2.052-.034 6.639.474 9.61 2.885a10.45 10.45 0 0 1 3.53 6.716 43.8 43.8 0 0 1 .417 9.769"/></svg>
|
||||
|
@ -145,7 +145,7 @@ The following classes can be used to customize various parts of the theme.
|
||||
|
||||
- `theme-toggle` - The theme toggle button
|
||||
|
||||
#### Cody Copy Button
|
||||
#### Code Copy Button
|
||||
|
||||
- `hextra-code-copy-btn-container` - The code copy button container
|
||||
- `hextra-code-copy-btn` - The code copy button
|
||||
|
@ -212,6 +212,22 @@ Options for `theme.default`:
|
||||
The `theme.displayToggle` parameter allows you to display a toggle button for changing themes.
|
||||
When set to `true`, visitors can switch between light or dark mode, overriding the default setting.
|
||||
|
||||
### Page Last Modification
|
||||
|
||||
The date of the page's last modification can be displayed by enabling the `params.displayUpdatedDate` flag. To use Git commit date as the source, enable also the `enableGitInfo` flag.
|
||||
|
||||
To customize the date format, set the `params.dateFormat` parameter. Its layout matches Hugo's [`time.Format`](https://gohugo.io/functions/time/format/).
|
||||
|
||||
```yaml {filename="hugo.yaml"}
|
||||
# Parse Git commit
|
||||
enableGitInfo: true
|
||||
|
||||
params:
|
||||
# Display the last modification date
|
||||
displayUpdatedDate: true
|
||||
dateFormat: "January 2, 2006"
|
||||
```
|
||||
|
||||
### Page Width
|
||||
|
||||
The width of the page can be customized by the `params.page.width` parameter in the config file:
|
||||
|
@ -171,6 +171,8 @@ With caption:
|
||||

|
||||
```
|
||||
|
||||
For more advanced functionality, use Hugo's built-in [Figure shortcode](https://gohugo.io/shortcodes/figure/).
|
||||
|
||||
## Configuration
|
||||
|
||||
Hugo uses [Goldmark](https://github.com/yuin/goldmark) for Markdown parsing.
|
||||
|
@ -12,6 +12,20 @@ Open source projects powered by Hextra
|
||||
</p>
|
||||
|
||||
{{< cards >}}
|
||||
{{< card
|
||||
link="https://github.com/claceio/clace"
|
||||
title="Clace"
|
||||
image="https://github.com/user-attachments/assets/55de142c-eb21-4402-81db-bc64417eaae2"
|
||||
imageStyle="object-fit:cover; aspect-ratio:16/9;"
|
||||
>}}
|
||||
|
||||
{{< card
|
||||
link="https://github.com/regolith-linux/regolith-desktop.com"
|
||||
title="Regolith Desktop"
|
||||
image="https://github.com/user-attachments/assets/4bbedd7d-67ef-4363-91f1-acb4a0c5f8d0"
|
||||
imageStyle="object-fit:cover; aspect-ratio:16/9;"
|
||||
>}}
|
||||
|
||||
{{< card
|
||||
link="https://github.com/modelcontextprotocol/specification"
|
||||
title="Model Context Protocol Specification"
|
||||
|
@ -3,6 +3,7 @@ baseURL: "https://example.com/"
|
||||
title: "Hextra"
|
||||
|
||||
enableRobotsTXT: true
|
||||
# Parse Git commit
|
||||
enableGitInfo: true
|
||||
# enableEmoji: false
|
||||
hasCJKLanguage: true
|
||||
@ -42,7 +43,7 @@ languages:
|
||||
module:
|
||||
hugoVersion:
|
||||
extended: true
|
||||
min: "0.112.0"
|
||||
min: "0.134.0"
|
||||
|
||||
workspace: hugo.work
|
||||
imports:
|
||||
@ -135,6 +136,7 @@ params:
|
||||
displayPoweredBy: true
|
||||
width: normal
|
||||
|
||||
# Display the last modification date
|
||||
displayUpdatedDate: true
|
||||
dateFormat: "January 2, 2006"
|
||||
|
||||
@ -162,6 +164,9 @@ params:
|
||||
sortBy: date
|
||||
sortOrder: desc # or "asc"
|
||||
|
||||
article:
|
||||
displayPagination: true
|
||||
|
||||
highlight:
|
||||
copy:
|
||||
enable: true
|
||||
|
@ -406,7 +406,6 @@
|
||||
"hx-mt-6",
|
||||
"hx-mt-8",
|
||||
"hx-mx-1",
|
||||
"hx-mx-2",
|
||||
"hx-mx-4",
|
||||
"hx-mx-auto",
|
||||
"hx-my-1.5",
|
||||
|
@ -2,7 +2,7 @@ backToTop: "Zpět nahoru"
|
||||
changeLanguage: "Změnit jazyk"
|
||||
changeTheme: "Změnit vzhled"
|
||||
copyCode: "Zkopírovat kód"
|
||||
copyright: "© 2024 Hextra Project."
|
||||
copyright: "© 2025 Hextra Project."
|
||||
dark: "Tmavý"
|
||||
editThisPage: "Upravit tuto stránku na GitHubu →"
|
||||
lastUpdated: "Naposledy změněno"
|
||||
|
@ -2,7 +2,7 @@ backToTop: "Nach oben"
|
||||
changeLanguage: "Sprache ändern"
|
||||
changeTheme: "Darstellung ändern"
|
||||
copyCode: "Code kopieren"
|
||||
copyright: "© 2024 Hextra Project."
|
||||
copyright: "© 2025 Hextra Project."
|
||||
dark: "Dunkel"
|
||||
editThisPage: "Diese Seite auf GitHub bearbeiten →"
|
||||
lastUpdated: "Zuletzt aktualisiert am"
|
||||
|
@ -2,7 +2,7 @@ backToTop: "Scroll to top"
|
||||
changeLanguage: "Change language"
|
||||
changeTheme: "Change theme"
|
||||
copyCode: "Copy code"
|
||||
copyright: "© 2024 Hextra Project."
|
||||
copyright: "© 2025 Hextra Project."
|
||||
dark: "Dark"
|
||||
editThisPage: "Edit this page on GitHub →"
|
||||
lastUpdated: "Last updated on"
|
||||
|
@ -1,7 +1,7 @@
|
||||
backToTop: "Subir al inicio"
|
||||
changeLanguage: "Cambiar idioma"
|
||||
changeTheme: "Cambiar tema"
|
||||
copyright: "© 2024 Proyecto Hextra."
|
||||
copyright: "© 2025 Proyecto Hextra."
|
||||
dark: "Oscuro"
|
||||
editThisPage: "Edita esta página en GitHub →"
|
||||
lastUpdated: "Última actualización"
|
||||
|
@ -1,7 +1,7 @@
|
||||
backToTop: "Revenir en haut"
|
||||
changeLanguage: "Changer la langue"
|
||||
changeTheme: "Thème d'affichage"
|
||||
copyright: "© 2024 Hextra Project."
|
||||
copyright: "© 2025 Hextra Project."
|
||||
dark: "Sombre"
|
||||
editThisPage: "Modifier cette page sur GitHub →"
|
||||
lastUpdated: "Dernière modification"
|
||||
|
@ -2,7 +2,7 @@ backToTop: "גלול למעלה"
|
||||
changeLanguage: "שנה שפה"
|
||||
changeTheme: "שנה ערכת צבעים"
|
||||
copyCode: "העתק קוד"
|
||||
copyright: "© 2024 פרוייקט Hextra"
|
||||
copyright: "© 2025 פרוייקט Hextra"
|
||||
dark: "כהה"
|
||||
editThisPage: "← ערוך עמוד זה בגיטהאב"
|
||||
lastUpdated: "עודכן לאחרונה ב"
|
||||
|
@ -1,7 +1,7 @@
|
||||
backToTop: "トップにスクロール"
|
||||
changeLanguage: "言語を変更"
|
||||
changeTheme: "テーマを変更"
|
||||
copyright: "© 2024 Hextra プロジェクト。"
|
||||
copyright: "© 2025 Hextra プロジェクト。"
|
||||
dark: "ダーク"
|
||||
editThisPage: "このページをGitHubで編集 →"
|
||||
lastUpdated: "最終更新日"
|
||||
|
@ -1,7 +1,7 @@
|
||||
backToTop: "맨위로 스크롤"
|
||||
changeLanguage: "언어변경"
|
||||
changeTheme: "테마변경"
|
||||
copyright: "© 2024 Hextra Project."
|
||||
copyright: "© 2025 Hextra Project."
|
||||
dark: "어두운 테마"
|
||||
editThisPage: "GitHub에서 편집하기 →"
|
||||
lastUpdated: "마지막 수정일자"
|
||||
|
@ -1,7 +1,7 @@
|
||||
backToTop: "Gå til toppen"
|
||||
changeLanguage: "Endre språk"
|
||||
changeTheme: "Endre tema"
|
||||
copyright: "© 2024 Hextra-prosjektet."
|
||||
copyright: "© 2025 Hextra-prosjektet."
|
||||
dark: "Mørk"
|
||||
editThisPage: "Rediger denne siden på GitHub →"
|
||||
lastUpdated: "Sist oppdatert"
|
||||
|
@ -2,7 +2,7 @@ backToTop: "Terug naar boven"
|
||||
changeLanguage: "Taal veranderen"
|
||||
changeTheme: "Thema aanpassen"
|
||||
copyCode: "Kopieer code"
|
||||
copyright: "© 2024 Hextra Project."
|
||||
copyright: "© 2025 Hextra Project."
|
||||
dark: "Donker"
|
||||
editThisPage: "Bewerk deze pagina op GitHub →"
|
||||
lastUpdated: "Laatst bijgewerkt op"
|
||||
|
@ -1,7 +1,7 @@
|
||||
backToTop: "Gå til toppen"
|
||||
changeLanguage: "Endre språk"
|
||||
changeTheme: "Endre tema"
|
||||
copyright: "© 2024 Hextra-prosjektet."
|
||||
copyright: "© 2025 Hextra-prosjektet."
|
||||
dark: "Mørk"
|
||||
editThisPage: "Rediger denne sida på GitHub →"
|
||||
lastUpdated: "Sist oppdatert"
|
||||
|
@ -1,7 +1,7 @@
|
||||
backToTop: "Voltar ao topo"
|
||||
changeLanguage: "Mudar a língua"
|
||||
changeTheme: "Mudar tema"
|
||||
copyright: "© 2024 Projecto Hextra."
|
||||
copyright: "© 2025 Projecto Hextra."
|
||||
dark: "Escuro"
|
||||
editThisPage: "Edita esta página no GitHub →"
|
||||
lastUpdated: "Última modificação"
|
||||
|
@ -2,7 +2,7 @@ backToTop: "Înapoi sus"
|
||||
changeLanguage: "Schimbă limba"
|
||||
changeTheme: "Schimbă tema"
|
||||
copyCode: "Copiază codul"
|
||||
copyright: "© 2024 Hextra Project."
|
||||
copyright: "© 2025 Hextra Project."
|
||||
dark: "Întuneric"
|
||||
editThisPage: "Editați această pagină pe GitHub ←"
|
||||
lastUpdated: "Ultima actualizare la"
|
||||
|
@ -2,7 +2,7 @@ backToTop: 'Прокрутить к началу'
|
||||
changeLanguage: 'Изменить язык'
|
||||
changeTheme: 'Изменить тему'
|
||||
copyCode: 'Скопировать код'
|
||||
copyright: '2024 Проект Hextra.'
|
||||
copyright: '2025 Проект Hextra.'
|
||||
dark: 'Темная'
|
||||
editThisPage: 'Отредактировать страницу на GitHub →'
|
||||
lastUpdated: 'Последнее обновление'
|
||||
|
@ -1,7 +1,7 @@
|
||||
backToTop: "Tembeza hadi juu"
|
||||
changeLanguage: "Badilisha lugha"
|
||||
changeTheme: "Badilisha mandhari"
|
||||
copyright: "© 2024 Hextra Project."
|
||||
copyright: "© 2025 Hextra Project."
|
||||
dark: "Meusi"
|
||||
editThisPage: "Hariri ukurasa huu kwenye GitHub →"
|
||||
lastUpdated: "Ilisasishwa mwisho"
|
||||
|
@ -2,7 +2,7 @@ backToTop: "Прокрутити до початку"
|
||||
changeLanguage: "Змінити мову"
|
||||
changeTheme: "Змінити тему"
|
||||
copyCode: "Скопіювати код"
|
||||
copyright: "2024 Проєкт Hextra."
|
||||
copyright: "2025 Проєкт Hextra."
|
||||
dark: "Темна"
|
||||
editThisPage: "Редагувати цю сторінку на GitHub →"
|
||||
lastUpdated: "Востаннє оновлено"
|
||||
|
@ -1,7 +1,7 @@
|
||||
backToTop: "Lướt lên đầu trang"
|
||||
changeLanguage: "Đổi ngôn ngữ"
|
||||
changeTheme: "Đổi chủ đề"
|
||||
copyright: "© 2024 Hextra Project."
|
||||
copyright: "© 2025 Hextra Project."
|
||||
dark: "Tối"
|
||||
editThisPage: "Sửa trang này trên GitHub →"
|
||||
lastUpdated: "Lần cuối cập nhật lúc"
|
||||
|
@ -1,7 +1,7 @@
|
||||
backToTop: "返回顶部"
|
||||
changeLanguage: "切换语言"
|
||||
changeTheme: "切换主题"
|
||||
copyright: "© 2024 Hextra Project."
|
||||
copyright: "© 2025 Hextra Project."
|
||||
dark: "深色"
|
||||
editThisPage: "在 GitHub 上编辑此页 →"
|
||||
lastUpdated: "最后更新于"
|
||||
|
@ -1,7 +1,7 @@
|
||||
backToTop: "返回頂部"
|
||||
changeLanguage: "切換語言"
|
||||
changeTheme: "切換主題"
|
||||
copyright: "© 2024 Hextra Project."
|
||||
copyright: "© 2025 Hextra Project."
|
||||
dark: "深色"
|
||||
editThisPage: "在 GitHub 上編輯此頁 →"
|
||||
lastUpdated: "最後更新於"
|
||||
|
@ -1,27 +1,39 @@
|
||||
<div style='font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"; height:100vh; text-align:center; display:flex; flex-direction:column; align-items:center; justify-content:center'>
|
||||
<div>
|
||||
<style>
|
||||
body {
|
||||
color: #000;
|
||||
background: #fff;
|
||||
margin: 0;
|
||||
}
|
||||
.next-error-h1 {
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
color: #fff;
|
||||
background: #000;
|
||||
}
|
||||
.next-error-h1 {
|
||||
border-right: 1px solid rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<h1 class="next-error-h1" style='display: inline-block; margin: 0 20px 0 0; padding-right: 23px; font-size: 24px; font-weight: 500; vertical-align: top; line-height: 49px; font-feature-settings: "rlig" 1,"calt" 1,"ss01" 1,"ss06" 1 !important;'>404</h1>
|
||||
<div style="display: inline-block; text-align: left">
|
||||
<h2 style="font-size: 14px; font-weight: 400; line-height: 49px; margin: 0">This page could not be found.</h2>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<body
|
||||
style='font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"; height:100vh; text-align:center; display:flex; flex-direction:column; align-items:center; justify-content:center'>
|
||||
<div>
|
||||
<style>
|
||||
body {
|
||||
color: #000;
|
||||
background: #fff;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.next-error-h1 {
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
color: #fff;
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.next-error-h1 {
|
||||
border-right: 1px solid rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<h1 class="next-error-h1"
|
||||
style='display: inline-block; margin: 0 20px 0 0; padding-right: 23px; font-size: 24px; font-weight: 500; vertical-align: top; line-height: 49px; font-feature-settings: "rlig" 1,"calt" 1,"ss01" 1,"ss06" 1 !important;'>
|
||||
404</h1>
|
||||
<div style="display: inline-block; text-align: left">
|
||||
<h2 style="font-size: 14px; font-weight: 400; line-height: 49px; margin: 0">This page could not be found.
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -38,10 +38,12 @@
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ partial "components/last-updated.html" . }}
|
||||
{{ .Scratch.Set "reversePagination" true }}
|
||||
{{ partial "components/pager.html" . }}
|
||||
{{ partial "components/comments.html" . }}
|
||||
{{- partial "components/last-updated.html" . -}}
|
||||
{{- if (site.Params.blog.article.displayPagination | default true) -}}
|
||||
{{- .Scratch.Set "reversePagination" true -}}
|
||||
{{- partial "components/pager.html" . -}}
|
||||
{{ end }}
|
||||
{{- partial "components/comments.html" . -}}
|
||||
</main>
|
||||
</article>
|
||||
</div>
|
||||
|
@ -25,5 +25,5 @@
|
||||
{{- if transform.CanHighlight $lang -}}
|
||||
<div>{{- highlight $content $lang $options -}}</div>
|
||||
{{- else -}}
|
||||
<pre><code>{{ $content }}</code></pre>
|
||||
<div><pre><code>{{ $content }}</code></pre></div>
|
||||
{{- end -}}
|
||||
|
@ -19,11 +19,11 @@
|
||||
<nav class="hx-mx-auto hx-flex hx-items-center hx-justify-end hx-gap-2 hx-h-16 hx-px-6 {{ $navWidth }}">
|
||||
<a class="hx-flex hx-items-center hover:hx-opacity-75 ltr:hx-mr-auto rtl:hx-ml-auto" href="{{ $logoLink }}">
|
||||
{{- if (.Site.Params.navbar.displayLogo | default true) }}
|
||||
<img class="hx-block dark:hx-hidden" src="{{ $logoPath | relURL }}" alt="{{ .Site.Title }}" height="{{ $logoHeight }}" width="{{ $logoWidth }}" />
|
||||
<img class="hx-hidden dark:hx-block" src="{{ $logoDarkPath | relURL }}" alt="{{ .Site.Title }}" height="{{ $logoHeight }}" width="{{ $logoWidth }}" />
|
||||
<img class="hx-mr-2 hx-block dark:hx-hidden" src="{{ $logoPath | relURL }}" alt="{{ .Site.Title }}" height="{{ $logoHeight }}" width="{{ $logoWidth }}" />
|
||||
<img class="hx-mr-2 hx-hidden dark:hx-block" src="{{ $logoDarkPath | relURL }}" alt="{{ .Site.Title }}" height="{{ $logoHeight }}" width="{{ $logoWidth }}" />
|
||||
{{- end }}
|
||||
{{- if (.Site.Params.navbar.displayTitle | default true) }}
|
||||
<span class="hx-mx-2 hx-font-extrabold hx-inline hx-select-none" title="{{ .Site.Title }}">{{- .Site.Title -}}</span>
|
||||
<span class="hx-mr-2 hx-font-extrabold hx-inline hx-select-none" title="{{ .Site.Title }}">{{- .Site.Title -}}</span>
|
||||
{{- end }}
|
||||
</a>
|
||||
|
||||
|
@ -1,104 +1,16 @@
|
||||
{{- $jsTheme := resources.Get "js/theme.js" | resources.ExecuteAsTemplate "theme.js" . -}}
|
||||
{{- $jsMenu := resources.Get "js/menu.js" -}}
|
||||
{{- $jsTabs := resources.Get "js/tabs.js" -}}
|
||||
{{- $jsLang := resources.Get "js/lang.js" -}}
|
||||
{{- $jsCodeCopy := resources.Get "js/code-copy.js" -}}
|
||||
{{- $jsFileTree := resources.Get "js/filetree.js" -}}
|
||||
{{- $jsSidebar := resources.Get "js/sidebar.js" -}}
|
||||
{{- $jsBackToTop := resources.Get "js/back-to-top.js" -}}
|
||||
|
||||
{{- $scripts := slice $jsTheme $jsMenu $jsCodeCopy $jsTabs $jsLang $jsFileTree $jsSidebar $jsBackToTop | resources.Concat "js/main.js" -}}
|
||||
{{- if hugo.IsProduction -}}
|
||||
{{- $scripts = $scripts | minify | fingerprint -}}
|
||||
{{- end -}}
|
||||
<script defer src="{{ $scripts.RelPermalink }}" integrity="{{ $scripts.Data.Integrity }}"></script>
|
||||
|
||||
{{/* Core scripts (theme, menu, tabs, etc.) */}}
|
||||
{{- partial "scripts/core.html" . -}}
|
||||
|
||||
{{/* Search */}}
|
||||
{{- if (site.Params.search.enable | default true) -}}
|
||||
{{- $searchType := site.Params.search.type | default "flexsearch" -}}
|
||||
{{- if eq $searchType "flexsearch" -}}
|
||||
{{- $jsSearchScript := printf "%s.search.js" .Language.Lang -}}
|
||||
{{- $jsSearch := resources.Get "js/flexsearch.js" | resources.ExecuteAsTemplate $jsSearchScript . -}}
|
||||
{{- if hugo.IsProduction -}}
|
||||
{{- $jsSearch = $jsSearch | minify | fingerprint -}}
|
||||
{{- end -}}
|
||||
{{- $flexSearchJS := resources.Get "lib/flexsearch/flexsearch.bundle.min.js" | fingerprint -}}
|
||||
<script defer src="{{ $flexSearchJS.RelPermalink }}" integrity="{{ $flexSearchJS.Data.Integrity }}"></script>
|
||||
<script defer src="{{ $jsSearch.RelPermalink }}" integrity="{{ $jsSearch.Data.Integrity }}"></script>
|
||||
{{- else -}}
|
||||
{{- warnf `search type "%s" is not supported` $searchType -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- partial "scripts/search.html" . -}}
|
||||
|
||||
{{/* Mermaid */}}
|
||||
{{/* FIXME: need to investigate .Page.Store hasMermaid is set for homepage */}}
|
||||
{{- if and (.Page.Store.Get "hasMermaid") (not .Page.IsHome) -}}
|
||||
{{- $mermaidJS := resources.Get "lib/mermaid/mermaid.min.js" | fingerprint -}}
|
||||
<script defer src="{{ $mermaidJS.RelPermalink }}" integrity="{{ $mermaidJS.Data.Integrity }}"></script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
// Store original mermaid code for each diagram
|
||||
document.querySelectorAll(".mermaid").forEach(el => {
|
||||
el.dataset.original = el.innerHTML;
|
||||
});
|
||||
|
||||
const theme = document.documentElement.classList.contains("dark") ? "dark" : "default";
|
||||
mermaid.initialize({ startOnLoad: true, theme: theme });
|
||||
|
||||
let timeout;
|
||||
new MutationObserver(() => {
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(() => {
|
||||
const theme = document.documentElement.classList.contains("dark") ? "dark" : "default";
|
||||
document.querySelectorAll(".mermaid").forEach(el => {
|
||||
// Reset to original content, preserving HTML
|
||||
el.innerHTML = el.dataset.original;
|
||||
el.removeAttribute("data-processed");
|
||||
});
|
||||
mermaid.initialize({ startOnLoad: true, theme: theme });
|
||||
mermaid.init();
|
||||
}, 150);
|
||||
}).observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ["class"]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{{- partial "scripts/mermaid.html" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* KaTex */}}
|
||||
{{- if .Page.Params.math -}}
|
||||
{{- $katexCSS := resources.Get "lib/katex/katex.min.css" | fingerprint -}}
|
||||
{{- $katexJS := resources.Get "lib/katex/katex.min.js" | fingerprint -}}
|
||||
{{- $mhchemJS := resources.Get "lib/katex/mhchem.min.js" | fingerprint -}}
|
||||
{{- $katexAutoRenderJS := resources.Get "lib/katex/auto-render.min.js" | fingerprint -}}
|
||||
<link type="text/css" rel="stylesheet" href="{{ $katexCSS.RelPermalink }}" integrity="{{ $katexCSS.Data.Integrity }}" />
|
||||
<script defer src="{{ $katexJS.RelPermalink }}" integrity="{{ $katexJS.Data.Integrity }}"></script>
|
||||
<script defer src="{{ $katexAutoRenderJS.RelPermalink }}" integrity="{{ $katexAutoRenderJS.Data.Integrity }}"></script>
|
||||
<script defer src="{{ $mhchemJS.RelPermalink }}" integrity="{{ $mhchemJS.Data.Integrity }}"></script>
|
||||
{{ $katexFonts := resources.Match "lib/katex/fonts/*" }}
|
||||
{{- range $katexFonts -}}
|
||||
{{ .Publish }}
|
||||
{{- end -}}
|
||||
<script>
|
||||
// TODO: make render options configurable
|
||||
// Reference: https://katex.org/docs/autorender#api
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
renderMathInElement(document.body, {
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: true },
|
||||
{ left: "$", right: "$", display: false },
|
||||
{ left: "\\(", right: "\\)", display: false },
|
||||
{ left: "\\begin{equation}", right: "\\end{equation}", display: true },
|
||||
{left: "\\begin{align}", right: "\\end{align}", display: true},
|
||||
{left: "\\begin{alignat}", right: "\\end{alignat}", display: true},
|
||||
{left: "\\begin{gather}", right: "\\end{gather}", display: true},
|
||||
{left: "\\begin{CD}", right: "\\end{CD}", display: true},
|
||||
{ left: "\\[", right: "\\]", display: true },
|
||||
],
|
||||
throwOnError: false,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
{{- partial "scripts/katex.html" . -}}
|
||||
{{- end -}}
|
||||
|
14
layouts/partials/scripts/core.html
Normal file
14
layouts/partials/scripts/core.html
Normal file
@ -0,0 +1,14 @@
|
||||
{{- $jsTheme := resources.Get "js/theme.js" | resources.ExecuteAsTemplate "theme.js" . -}}
|
||||
{{- $jsMenu := resources.Get "js/menu.js" -}}
|
||||
{{- $jsTabs := resources.Get "js/tabs.js" -}}
|
||||
{{- $jsLang := resources.Get "js/lang.js" -}}
|
||||
{{- $jsCodeCopy := resources.Get "js/code-copy.js" -}}
|
||||
{{- $jsFileTree := resources.Get "js/filetree.js" -}}
|
||||
{{- $jsSidebar := resources.Get "js/sidebar.js" -}}
|
||||
{{- $jsBackToTop := resources.Get "js/back-to-top.js" -}}
|
||||
|
||||
{{- $scripts := slice $jsTheme $jsMenu $jsCodeCopy $jsTabs $jsLang $jsFileTree $jsSidebar $jsBackToTop | resources.Concat "js/main.js" -}}
|
||||
{{- if hugo.IsProduction -}}
|
||||
{{- $scripts = $scripts | minify | fingerprint -}}
|
||||
{{- end -}}
|
||||
<script defer src="{{ $scripts.RelPermalink }}" integrity="{{ $scripts.Data.Integrity }}"></script>
|
33
layouts/partials/scripts/katex.html
Normal file
33
layouts/partials/scripts/katex.html
Normal file
@ -0,0 +1,33 @@
|
||||
{{/* KaTex */}}
|
||||
{{- $katexCSS := resources.Get "lib/katex/katex.min.css" | fingerprint -}}
|
||||
{{- $katexJS := resources.Get "lib/katex/katex.min.js" | fingerprint -}}
|
||||
{{- $mhchemJS := resources.Get "lib/katex/mhchem.min.js" | fingerprint -}}
|
||||
{{- $katexAutoRenderJS := resources.Get "lib/katex/auto-render.min.js" | fingerprint -}}
|
||||
<link type="text/css" rel="stylesheet" href="{{ $katexCSS.RelPermalink }}" integrity="{{ $katexCSS.Data.Integrity }}" />
|
||||
<script defer src="{{ $katexJS.RelPermalink }}" integrity="{{ $katexJS.Data.Integrity }}"></script>
|
||||
<script defer src="{{ $katexAutoRenderJS.RelPermalink }}" integrity="{{ $katexAutoRenderJS.Data.Integrity }}"></script>
|
||||
<script defer src="{{ $mhchemJS.RelPermalink }}" integrity="{{ $mhchemJS.Data.Integrity }}"></script>
|
||||
{{ $katexFonts := resources.Match "lib/katex/fonts/*" }}
|
||||
{{- range $katexFonts -}}
|
||||
{{ .Publish }}
|
||||
{{- end -}}
|
||||
<script>
|
||||
// TODO: make render options configurable
|
||||
// Reference: https://katex.org/docs/autorender#api
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
renderMathInElement(document.body, {
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: true },
|
||||
{ left: "$", right: "$", display: false },
|
||||
{ left: "\\(", right: "\\)", display: false },
|
||||
{ left: "\\begin{equation}", right: "\\end{equation}", display: true },
|
||||
{left: "\\begin{align}", right: "\\end{align}", display: true},
|
||||
{left: "\\begin{alignat}", right: "\\end{alignat}", display: true},
|
||||
{left: "\\begin{gather}", right: "\\end{gather}", display: true},
|
||||
{left: "\\begin{CD}", right: "\\end{CD}", display: true},
|
||||
{ left: "\\[", right: "\\]", display: true },
|
||||
],
|
||||
throwOnError: false,
|
||||
});
|
||||
});
|
||||
</script>
|
33
layouts/partials/scripts/mermaid.html
Normal file
33
layouts/partials/scripts/mermaid.html
Normal file
@ -0,0 +1,33 @@
|
||||
{{/* Mermaid */}}
|
||||
|
||||
{{- $mermaidJS := resources.Get "lib/mermaid/mermaid.min.js" | fingerprint -}}
|
||||
<script defer src="{{ $mermaidJS.RelPermalink }}" integrity="{{ $mermaidJS.Data.Integrity }}"></script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
// Store original mermaid code for each diagram
|
||||
document.querySelectorAll(".mermaid").forEach(el => {
|
||||
el.dataset.original = el.innerHTML;
|
||||
});
|
||||
|
||||
const theme = document.documentElement.classList.contains("dark") ? "dark" : "default";
|
||||
mermaid.initialize({ startOnLoad: true, theme: theme });
|
||||
|
||||
let timeout;
|
||||
new MutationObserver(() => {
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(() => {
|
||||
const theme = document.documentElement.classList.contains("dark") ? "dark" : "default";
|
||||
document.querySelectorAll(".mermaid").forEach(el => {
|
||||
// Reset to original content, preserving HTML
|
||||
el.innerHTML = el.dataset.original;
|
||||
el.removeAttribute("data-processed");
|
||||
});
|
||||
mermaid.initialize({ startOnLoad: true, theme: theme });
|
||||
mermaid.init();
|
||||
}, 150);
|
||||
}).observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ["class"]
|
||||
});
|
||||
});
|
||||
</script>
|
16
layouts/partials/scripts/search.html
Normal file
16
layouts/partials/scripts/search.html
Normal file
@ -0,0 +1,16 @@
|
||||
{{/* Search */}}
|
||||
{{- if (site.Params.search.enable | default true) -}}
|
||||
{{- $searchType := site.Params.search.type | default "flexsearch" -}}
|
||||
{{- if eq $searchType "flexsearch" -}}
|
||||
{{- $jsSearchScript := printf "%s.search.js" .Language.Lang -}}
|
||||
{{- $jsSearch := resources.Get "js/flexsearch.js" | resources.ExecuteAsTemplate $jsSearchScript . -}}
|
||||
{{- if hugo.IsProduction -}}
|
||||
{{- $jsSearch = $jsSearch | minify | fingerprint -}}
|
||||
{{- end -}}
|
||||
{{- $flexSearchJS := resources.Get "lib/flexsearch/flexsearch.bundle.min.js" | fingerprint -}}
|
||||
<script defer src="{{ $flexSearchJS.RelPermalink }}" integrity="{{ $flexSearchJS.Data.Integrity }}"></script>
|
||||
<script defer src="{{ $jsSearch.RelPermalink }}" integrity="{{ $jsSearch.Data.Integrity }}"></script>
|
||||
{{- else -}}
|
||||
{{- warnf `search type "%s" is not supported` $searchType -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
@ -126,7 +126,7 @@
|
||||
href="#{{ anchorize .ID }}"
|
||||
class="hx-flex hx-rounded hx-px-2 hx-py-1.5 hx-text-sm hx-transition-colors [word-break:break-word] hx-cursor-pointer [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] contrast-more:hx-border hx-gap-2 before:hx-opacity-25 before:hx-content-['#'] hx-text-gray-500 hover:hx-bg-gray-100 hover:hx-text-gray-900 dark:hx-text-neutral-400 dark:hover:hx-bg-primary-100/5 dark:hover:hx-text-gray-50 contrast-more:hx-text-gray-900 contrast-more:dark:hx-text-gray-50 contrast-more:hx-border-transparent contrast-more:hover:hx-border-gray-900 contrast-more:dark:hover:hx-border-gray-50"
|
||||
>
|
||||
{{- .Title -}}
|
||||
{{- .Title | safeHTML | plainify | htmlUnescape -}}
|
||||
</a>
|
||||
</li>
|
||||
{{ end -}}
|
||||
@ -144,7 +144,13 @@
|
||||
<span class="hx-cursor-default">{{ $name }}</span>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>{{ template "sidebar-item-link" dict "active" false "title" $name "link" (.URL | relLangURL) }}</li>
|
||||
{{- $link := .URL -}}
|
||||
{{- with .PageRef -}}
|
||||
{{- if hasPrefix . "/" -}}
|
||||
{{- $link = relLangURL (strings.TrimPrefix "/" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<li>{{ template "sidebar-item-link" dict "active" false "title" $name "link" $link }}</li>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="hextra-filetree hx-mt-6 hx-select-none hx-text-sm hx-text-gray-800 dark:hx-text-gray-300 not-prose">
|
||||
<div class="hx-inline-block hx-rounded-lg hx-border hx-px-4 hx-py-2 dark:hx-border-neutral-800">
|
||||
{{- .Inner -}}
|
||||
{{- .InnerDeindent -}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -12,6 +12,6 @@
|
||||
<span class="ltr:hx-ml-1 rtl:hx-mr-1">{{ $name }}</span>
|
||||
</button>
|
||||
<ul data-state="{{ $state }}" class="ltr:hx-pl-5 rtl:hx-pr-5 data-[state=closed]:hx-hidden">
|
||||
{{- .Inner -}}
|
||||
{{- .InnerDeindent -}}
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -7,6 +7,6 @@ command = "cd exampleSite && hugo --gc --minify --themesDir ../.. -b ${DEPLOY_PR
|
||||
ignore = "false"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.138.0"
|
||||
GO_VERSION = "1.22.3"
|
||||
NODE_VERSION = "22.2.0"
|
||||
HUGO_VERSION = "0.145.0"
|
||||
GO_VERSION = "1.24.0"
|
||||
NODE_VERSION = "22.14.0"
|
||||
|
@ -9,7 +9,7 @@ homepage = "https://github.com/imfing/hextra/"
|
||||
demosite = "https://imfing.github.io/hextra/"
|
||||
tags = ["Modern", "Elegant", "Blog", "Documentation", "Responsive", "Clean", "Light", "Dark", "Minimal"]
|
||||
features = ["Responsive", "Dark Mode", "Search", "Syntax Highlighting", "Multilingual", "Social", "Blog", "RSS", "Customization"]
|
||||
min_version = "0.124.0"
|
||||
min_version = "0.134.0"
|
||||
|
||||
[author]
|
||||
name = "Xin"
|
||||
|
Reference in New Issue
Block a user