- Theme Decoupling & Cleanup:
- Fully decoupled and vendored the Blowfish theme directly into root directories (layouts/,
assets/, static/, data/, i18n/).
- De-registered and cleaned up legacy Git submodules (themes/blowfish, themes/hugo-admonitions)
from the Git index to protect the build from upstream breakages.
- Configured .gitignore to ignore development preview symlinks (content, static,
config/_default/menus.en.toml), build folders (public/, resources/), and locks.
- TOC & Layout Fixes:
- Replaced the custom layouts/_default/single.html template with the Blowfish default to restore
native container widths and the side-by-side flex layout.
- Restored TOC to float on the right sidebar on desktop viewports and render inline on mobile
viewports.
- Fixed a parameter resolution bug in layouts/partials/toc.html by checking both .Site.Params.
smartTOC and .Site.Params.article.smartTOC (where it is defined in params.toml).
- Upgraded the TOC scrollspy JavaScript to target all '#TableOfContents' containers on the page,
enabling highlight tracking on both desktop and mobile layouts.
- Documentation Updates (README.md):
- Restored YAML front matter metadata block at the top.
- Added detailed notes on the CI/CD build process and Gitea runner deployment targets
(/srv/www/docs-public and /srv/www/docs-private).
- Added a categorized and sorted "Shortcodes Quick Reference" table at the top of the shortcodes
section (ordered by Custom, Hugo Default, and Blowfish).
- Documented custom shortcodes (Include, Screenshot, Raw HTML) and missing Hugo default
shortcodes (Highlight, Instagram, Param, Ref, Relref, Twitter, Vimeo, Youtube).
- Restructured headings to ensure all sub-shortcodes are H3, removed block break tags (<br/>),
and appended horizontal separators (---) after H2 sections.
62 lines
2.6 KiB
HTML
62 lines
2.6 KiB
HTML
{{ $id := delimit (slice "gitlab" (partial "functions/uid.html" .)) "-" }}
|
|
{{- $gitlabURL := print (default "https://gitlab.com/" (.Get "baseURL")) "api/v4/projects/" (.Get "projectID") -}}
|
|
{{- $gitLabData := dict -}}
|
|
{{- with try (resources.GetRemote $gitlabURL) -}}
|
|
{{- with .Err -}}
|
|
{{- warnf "gitlab shortcode: failed to fetch remote resource from %q: %s" $gitlabURL $.Position -}}
|
|
{{- else with .Value -}}
|
|
{{- $gitLabData = . | transform.Unmarshal -}}
|
|
{{- else -}}
|
|
{{- warnf "gitlab shortcode: unable to get remote resource from %q: %s" $gitlabURL $.Position -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- with $gitLabData -}}
|
|
<div class="gitlab-card-wrapper">
|
|
<a id="{{ $id }}" target="_blank" href="{{ .web_url }}" class="cursor-pointer">
|
|
<div
|
|
class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl">
|
|
<div class="flex items-center">
|
|
<span class="text-2xl text-neutral-800 dark:text-neutral me-2">
|
|
{{ partial "icon.html" "gitlab" }}
|
|
</span>
|
|
<div
|
|
id="{{ $id }}-name_with_namespace"
|
|
class="m-0 font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral">
|
|
{{ .name_with_namespace | markdownify }}
|
|
</div>
|
|
</div>
|
|
|
|
<p id="{{ $id }}-description" class="m-0 mt-2 text-md text-neutral-800 dark:text-neutral">
|
|
{{ .description | markdownify }}
|
|
</p>
|
|
|
|
<div class="m-0 mt-2 flex items-center">
|
|
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
|
|
{{ partial "icon.html" "star" }}
|
|
</span>
|
|
<div id="{{ $id }}-star_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
|
{{ .star_count }}
|
|
</div>
|
|
|
|
<span class="text-md mr-1 text-neutral-800 dark:text-neutral">
|
|
{{ partial "icon.html" "fork" }}
|
|
</span>
|
|
<div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral">
|
|
{{ .forks_count }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ $fetchRepo := resources.Get "js/fetch-repo.js" }}
|
|
{{ $fetchRepo = $fetchRepo | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
|
<script
|
|
async
|
|
type="text/javascript"
|
|
src="{{ $fetchRepo.RelPermalink }}"
|
|
integrity="{{ $fetchRepo.Data.Integrity }}"
|
|
data-repo-url="{{ $gitlabURL }}"
|
|
data-repo-id="{{ $id }}"></script>
|
|
</a>
|
|
</div>
|
|
{{- end -}}
|