mirror of
https://github.com/imfing/hextra.git
synced 2025-05-13 00:36:26 -04:00
Compare commits
5 Commits
b70d729283
...
081ad8b84f
Author | SHA1 | Date | |
---|---|---|---|
![]() |
081ad8b84f | ||
![]() |
7593ef4ae4 | ||
![]() |
4c4f43779c | ||
![]() |
ff85e6951d | ||
![]() |
ec37876f4d |
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -17,6 +17,8 @@ assignees: ''
|
||||
2.
|
||||
3.
|
||||
|
||||
<!-- Provide a minimal example or link to a repository that reproduces the bug -->
|
||||
|
||||
**Expected Behavior**
|
||||
|
||||
<!-- What should have happened? -->
|
||||
|
15
.github/workflows/pages.yml
vendored
15
.github/workflows/pages.yml
vendored
@ -31,7 +31,7 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
HUGO_VERSION: 0.131.0
|
||||
HUGO_VERSION: 0.136.5
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@ -41,10 +41,10 @@ jobs:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.22'
|
||||
go-version: '1.23'
|
||||
- name: Setup Pages
|
||||
id: pages
|
||||
uses: actions/configure-pages@v4
|
||||
uses: actions/configure-pages@v5
|
||||
- name: Setup Hugo
|
||||
run: |
|
||||
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
|
||||
@ -54,11 +54,12 @@ jobs:
|
||||
# For maximum backward compatibility with Hugo modules
|
||||
HUGO_ENVIRONMENT: production
|
||||
HUGO_ENV: production
|
||||
# Use the latest release of the theme to build exampleSite
|
||||
run: |
|
||||
hugo \
|
||||
--minify \
|
||||
--themesDir=../.. --source=exampleSite \
|
||||
--baseURL "${{ steps.pages.outputs.base_url }}/"
|
||||
cd exampleSite && rm go.mod
|
||||
hugo mod init github.com/imfing/hextra/exampleSite
|
||||
hugo mod get -u github.com/imfing/hextra
|
||||
hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
|
@ -3,6 +3,18 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
enableCollapsibles();
|
||||
});
|
||||
|
||||
function debounce(func, wait) {
|
||||
let timeout;
|
||||
return function executedFunction(...args) {
|
||||
const later = () => {
|
||||
clearTimeout(timeout);
|
||||
func(...args);
|
||||
};
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(later, wait);
|
||||
};
|
||||
}
|
||||
|
||||
function enableCollapsibles() {
|
||||
const buttons = document.querySelectorAll(".hextra-sidebar-collapsible-button");
|
||||
buttons.forEach(function (button) {
|
||||
@ -16,10 +28,9 @@ function enableCollapsibles() {
|
||||
});
|
||||
}
|
||||
|
||||
function saveSidebarPosition() {
|
||||
const sidebarScrollbar = document.querySelector("aside.sidebar-container > .hextra-scrollbar");
|
||||
if (sidebarScrollbar) {
|
||||
const scrollPosition = sidebarScrollbar.scrollTop;
|
||||
function saveSidebarPosition(scrollPosition) {
|
||||
const currentPosition = sessionStorage.getItem('sidebarScrollPosition');
|
||||
if (currentPosition === null || parseInt(currentPosition) !== scrollPosition) {
|
||||
sessionStorage.setItem('sidebarScrollPosition', scrollPosition);
|
||||
}
|
||||
}
|
||||
@ -36,8 +47,12 @@ function restoreSidebarPosition() {
|
||||
});
|
||||
}
|
||||
|
||||
const debouncedSave = debounce((position) => {
|
||||
saveSidebarPosition(position);
|
||||
}, 150);
|
||||
|
||||
sidebarScrollbar.addEventListener('scroll', function() {
|
||||
saveSidebarPosition();
|
||||
debouncedSave(this.scrollTop);
|
||||
});
|
||||
}
|
||||
}
|
@ -12,6 +12,12 @@ Open source projects powered by Hextra
|
||||
</p>
|
||||
|
||||
{{< cards >}}
|
||||
{{< card
|
||||
link="https://github.com/mightymoud/sidekick"
|
||||
title="Sidekick"
|
||||
image="https://github.com/user-attachments/assets/4ae2a9d7-77b6-42eb-a9d7-5c4599f0f812"
|
||||
imageStyle="object-fit:cover; aspect-ratio:16/9;"
|
||||
>}}
|
||||
|
||||
{{< card
|
||||
link="https://github.com/welding-torch/installc"
|
||||
|
@ -6,7 +6,7 @@
|
||||
{{ else -}}
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
{{ end -}}
|
||||
{{ partialCached "favicons.html" . }}
|
||||
{{ partialCached "favicons.html" . -}}
|
||||
<title>
|
||||
{{- if .IsHome -}}
|
||||
{{ .Site.Title -}}
|
||||
@ -17,17 +17,17 @@
|
||||
</title>
|
||||
<meta name="description" content="{{ partial "utils/page-description.html" . }}" />
|
||||
|
||||
{{ with .Params.canonical }}
|
||||
{{- with .Params.canonical -}}
|
||||
<link rel="canonical" href="{{ . }}" itemprop="url" />
|
||||
{{ else }}
|
||||
{{- else -}}
|
||||
<link rel="canonical" href="{{ .Permalink }}" itemprop="url" />
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{ partial "opengraph.html" . }}
|
||||
{{ template "_internal/schema.html" . -}}
|
||||
{{ template "_internal/twitter_cards.html" . -}}
|
||||
{{- partial "opengraph.html" . -}}
|
||||
{{- template "_internal/schema.html" . -}}
|
||||
{{- template "_internal/twitter_cards.html" . -}}
|
||||
|
||||
{{ partialCached "head-css.html" . }}
|
||||
{{- partialCached "head-css.html" . -}}
|
||||
|
||||
|
||||
<!-- Google Analytics -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user