Compare commits

...

8 Commits

Author SHA1 Message Date
Robb Shecter
9edad76870
Merge 27a70e4c122e0590248f0cb49767403f422d56a9 into 4c4f43779c6de5adf1c61edd4e79aae233965393 2024-11-08 12:51:58 +00:00
Xin
4c4f43779c build(ci): build doc site from latest release instead of main
Some checks failed
Deploy Hugo site to Pages / build (push) Has been cancelled
Deploy Hugo site to Pages / deploy (push) Has been cancelled
- bump hugo version in workflow
- bump github actions deps versions
- minor update to head.html to remove empty spaces
2024-11-03 16:53:18 +00:00
Xin
ff85e6951d chore: update bug report template 2024-11-03 16:08:29 +00:00
Xin
ec37876f4d docs(showcase): add Sidekick 2024-11-03 15:35:32 +00:00
Todd Zhou
f65aca556d
fix: typo in ref="noreferrer" (#489)
Some checks failed
Deploy Hugo site to Pages / build (push) Has been cancelled
Deploy Hugo site to Pages / deploy (push) Has been cancelled
2024-11-01 10:12:14 +00:00
Robb Shecter
27a70e4c12
Cleanup 2024-04-15 18:53:50 -06:00
Robb Shecter
aeb0cad979
Special case for Chinese 2024-04-15 18:53:10 -06:00
Robb Shecter
fd38dd116f
Update giscus.html 2024-04-15 15:40:30 -06:00
8 changed files with 52 additions and 21 deletions

View File

@ -17,6 +17,8 @@ assignees: ''
2. 2.
3. 3.
<!-- Provide a minimal example or link to a repository that reproduces the bug -->
**Expected Behavior** **Expected Behavior**
<!-- What should have happened? --> <!-- What should have happened? -->

View File

@ -31,7 +31,7 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
HUGO_VERSION: 0.131.0 HUGO_VERSION: 0.136.5
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -41,10 +41,10 @@ jobs:
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: '1.22' go-version: '1.23'
- name: Setup Pages - name: Setup Pages
id: pages id: pages
uses: actions/configure-pages@v4 uses: actions/configure-pages@v5
- name: Setup Hugo - name: Setup Hugo
run: | run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ 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 # For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production HUGO_ENVIRONMENT: production
HUGO_ENV: production HUGO_ENV: production
# Use the latest release of the theme to build exampleSite
run: | run: |
hugo \ cd exampleSite && rm go.mod
--minify \ hugo mod init github.com/imfing/hextra/exampleSite
--themesDir=../.. --source=exampleSite \ hugo mod get -u github.com/imfing/hextra
--baseURL "${{ steps.pages.outputs.base_url }}/" hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact - name: Upload artifact
uses: actions/upload-pages-artifact@v3 uses: actions/upload-pages-artifact@v3
with: with:

View File

@ -12,6 +12,12 @@ Open source projects powered by Hextra
</p> </p>
{{< cards >}} {{< 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 {{< card
link="https://github.com/welding-torch/installc" link="https://github.com/welding-torch/installc"

View File

@ -1,4 +1,26 @@
{{- $lang := site.Language.LanguageCode | default `en` -}} {{ $default_chinese := "zh-CN" }}
{{ $sl := site.Language }}
{{ $giscus_lang := $sl.Lang | default `en` }}
{{/*
Special case for Chinese.
Giscus uses the geophraphical language code for these.
See: https://github.com/giscus/giscus/tree/main/locales
*/}}
{{ if eq $giscus_lang "zh" }}
{{/* Create a code formatted for Giscus: zh-CN or zn-TW. */}}
{{ $code := lower $sl.LanguageCode }}
{{ if (hasSuffix $code "-cn") }}
{{ $giscus_lang = "zh-CN" }}
{{ else if (hasSuffix $code "-tw") }}
{{ $giscus_lang = "zh-TW" }}
{{ else }}
{{ $giscus_lang = $default_chinese }}
{{ end }}
{{ end }}
{{- with site.Params.comments.giscus -}} {{- with site.Params.comments.giscus -}}
<script> <script>
@ -38,7 +60,7 @@
"data-emit-metadata": "{{ (string .emitMetadata) | default 0 }}", "data-emit-metadata": "{{ (string .emitMetadata) | default 0 }}",
"data-input-position": "{{ .inputPosition | default `top` }}", "data-input-position": "{{ .inputPosition | default `top` }}",
"data-theme": getGiscusTheme(), "data-theme": getGiscusTheme(),
"data-lang": "{{ .lang | default $lang }}", "data-lang": "{{ .lang | default $giscus_lang }}",
"crossorigin": "anonymous", "crossorigin": "anonymous",
"async": "", "async": "",
}; };

View File

@ -6,7 +6,7 @@
{{ else -}} {{ else -}}
<meta name="robots" content="noindex, nofollow" /> <meta name="robots" content="noindex, nofollow" />
{{ end -}} {{ end -}}
{{ partialCached "favicons.html" . }} {{ partialCached "favicons.html" . -}}
<title> <title>
{{- if .IsHome -}} {{- if .IsHome -}}
{{ .Site.Title -}} {{ .Site.Title -}}
@ -17,17 +17,17 @@
</title> </title>
<meta name="description" content="{{ partial "utils/page-description.html" . }}" /> <meta name="description" content="{{ partial "utils/page-description.html" . }}" />
{{ with .Params.canonical }} {{- with .Params.canonical -}}
<link rel="canonical" href="{{ . }}" itemprop="url" /> <link rel="canonical" href="{{ . }}" itemprop="url" />
{{ else }} {{- else -}}
<link rel="canonical" href="{{ .Permalink }}" itemprop="url" /> <link rel="canonical" href="{{ .Permalink }}" itemprop="url" />
{{ end }} {{- end -}}
{{ partial "opengraph.html" . }} {{- partial "opengraph.html" . -}}
{{ template "_internal/schema.html" . -}} {{- template "_internal/schema.html" . -}}
{{ template "_internal/twitter_cards.html" . -}} {{- template "_internal/twitter_cards.html" . -}}
{{ partialCached "head-css.html" . }} {{- partialCached "head-css.html" . -}}
<!-- Google Analytics --> <!-- Google Analytics -->

View File

@ -42,7 +42,7 @@
{{/* Display icon menu item */}} {{/* Display icon menu item */}}
{{- if .Params.icon -}} {{- if .Params.icon -}}
{{- $rel := cond (eq .Params.icon "mastodon") "noreferer me" "noreferer" }} {{- $rel := cond (eq .Params.icon "mastodon") "noreferrer me" "noreferrer" }}
<a class="hx-p-2 hx-text-current" {{ if $external }}target="_blank" rel="{{ $rel }}"{{ end }} href="{{ $link }}" title="{{ or (T .Identifier) .Name | safeHTML }}"> <a class="hx-p-2 hx-text-current" {{ if $external }}target="_blank" rel="{{ $rel }}"{{ end }} href="{{ $link }}" title="{{ or (T .Identifier) .Name | safeHTML }}">
{{- partial "utils/icon.html" (dict "name" .Params.icon "attributes" "height=24") -}} {{- partial "utils/icon.html" (dict "name" .Params.icon "attributes" "height=24") -}}
<span class="hx-sr-only">{{ or (T .Identifier) .Name | safeHTML }}</span> <span class="hx-sr-only">{{ or (T .Identifier) .Name | safeHTML }}</span>
@ -53,7 +53,7 @@
<a <a
title="{{ or (T .Identifier) .Name | safeHTML }}" title="{{ or (T .Identifier) .Name | safeHTML }}"
href="{{ $link }}" href="{{ $link }}"
{{ if $external }}target="_blank" rel="noreferer"{{ end }} {{ if $external }}target="_blank" rel="noreferrer"{{ end }}
class="hx-text-sm contrast-more:hx-text-gray-700 contrast-more:dark:hx-text-gray-100 hx-relative -hx-ml-2 hx-hidden hx-whitespace-nowrap hx-p-2 md:hx-inline-block {{ $activeClass }}" class="hx-text-sm contrast-more:hx-text-gray-700 contrast-more:dark:hx-text-gray-100 hx-relative -hx-ml-2 hx-hidden hx-whitespace-nowrap hx-p-2 md:hx-inline-block {{ $activeClass }}"
> >
<span class="hx-text-center">{{ or (T .Identifier) .Name | safeHTML }}</span> <span class="hx-text-center">{{ or (T .Identifier) .Name | safeHTML }}</span>

View File

@ -160,7 +160,7 @@
hx-text-gray-500 hover:hx-bg-gray-100 hover:hx-text-gray-900 contrast-more:hx-border contrast-more:hx-border-transparent contrast-more:hx-text-gray-900 contrast-more:hover:hx-border-gray-900 dark:hx-text-neutral-400 dark:hover:hx-bg-primary-100/5 dark:hover:hx-text-gray-50 contrast-more:dark:hx-text-gray-50 contrast-more:dark:hover:hx-border-gray-50 hx-text-gray-500 hover:hx-bg-gray-100 hover:hx-text-gray-900 contrast-more:hx-border contrast-more:hx-border-transparent contrast-more:hx-text-gray-900 contrast-more:hover:hx-border-gray-900 dark:hx-text-neutral-400 dark:hover:hx-bg-primary-100/5 dark:hover:hx-text-gray-50 contrast-more:dark:hx-text-gray-50 contrast-more:dark:hover:hx-border-gray-50
{{- end -}}" {{- end -}}"
href="{{ .link }}" href="{{ .link }}"
{{ if $external }}target="_blank" rel="noreferer"{{ end }} {{ if $external }}target="_blank" rel="noreferrer"{{ end }}
> >
{{- .title -}} {{- .title -}}
{{- with .context }} {{- with .context }}

View File

@ -38,7 +38,7 @@
{{- $editURL = urls.JoinPath $editURL $sourceDir $path -}} {{- $editURL = urls.JoinPath $editURL $sourceDir $path -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
<a class="hx-text-xs hx-font-medium hx-text-gray-500 hover:hx-text-gray-900 dark:hx-text-gray-400 dark:hover:hx-text-gray-100 contrast-more:hx-text-gray-800 contrast-more:dark:hx-text-gray-50" href="{{ $editURL }}" target="_blank" rel="noreferer">{{ $editThisPage }}</a> <a class="hx-text-xs hx-font-medium hx-text-gray-500 hover:hx-text-gray-900 dark:hx-text-gray-400 dark:hover:hx-text-gray-100 contrast-more:hx-text-gray-800 contrast-more:dark:hx-text-gray-50" href="{{ $editURL }}" target="_blank" rel="noreferrer">{{ $editThisPage }}</a>
{{- end -}} {{- end -}}
{{/* Scroll To Top */}} {{/* Scroll To Top */}}
<button aria-hidden="true" id="backToTop" onClick="scrollUp();" class="hx-transition-all hx-duration-75 hx-opacity-0 hx-text-xs hx-font-medium hx-text-gray-500 hover:hx-text-gray-900 dark:hx-text-gray-400 dark:hover:hx-text-gray-100 contrast-more:hx-text-gray-800 contrast-more:dark:hx-text-gray-50"> <button aria-hidden="true" id="backToTop" onClick="scrollUp();" class="hx-transition-all hx-duration-75 hx-opacity-0 hx-text-xs hx-font-medium hx-text-gray-500 hover:hx-text-gray-900 dark:hx-text-gray-400 dark:hover:hx-text-gray-100 contrast-more:hx-text-gray-800 contrast-more:dark:hx-text-gray-50">