mirror of
https://github.com/tiennm99/penny-pincher-provider.git
synced 2026-10-11 03:13:43 +00:00
fix(site): replace Page not found nav item with GitHub repo link
Minima's header lists every titled page, so 404.html appeared in the menu. Override the header to show a single link to the repository, and make the 404 page's home link respect baseurl.
This commit is contained in:
1 parent
bc9a3f5c7f
commit
972fec50eb
4 files changed
+35
-2
No files matched your search
@@ -7,7 +7,7 @@ permalink: /404.html
|
||||
<h1>Page not found</h1>
|
||||
|
||||
<p>That page does not exist. The provider list lives on the
|
||||
<a href="/">home page</a>.</p>
|
||||
<a href="{{ "/" | relative_url }}">home page</a>.</p>
|
||||
|
||||
<p>If a link here is broken,
|
||||
<a href="https://github.com/tiennm99/penny-pincher-provider/issues/new">open an issue</a>.</p>
|
||||
<a href="https://github.com/{{ site.repository }}/issues/new">open an issue</a>.</p>
|
||||
@@ -3,6 +3,9 @@ description: A curated list of affordable (or almost free) LLM providers
|
||||
theme: minima
|
||||
show_downloads: false
|
||||
|
||||
# Linked from the header nav (_includes/header.html) and 404.html.
|
||||
repository: tiennm99/penny-pincher-provider
|
||||
|
||||
# GitHub Pages target. It only ever reads this file, so its values live here and
|
||||
# Cloudflare overrides them via _config.cloudflare.yml.
|
||||
url: https://tiennm99.github.io
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
{%- comment -%}
|
||||
Overrides minima's header. Its default nav lists every titled page, which
|
||||
surfaced 404.html as a "Page not found" menu item; this nav links the repo.
|
||||
{%- endcomment -%}
|
||||
<header class="site-header" role="banner">
|
||||
|
||||
<div class="wrapper">
|
||||
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
|
||||
|
||||
{%- if site.repository -%}
|
||||
<nav class="site-nav">
|
||||
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
|
||||
<label for="nav-trigger">
|
||||
<span class="menu-icon">
|
||||
<svg viewBox="0 0 18 15" width="18px" height="15px">
|
||||
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
|
||||
</svg>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<div class="trigger">
|
||||
<a class="page-link" href="https://github.com/{{ site.repository }}">GitHub</a>
|
||||
</div>
|
||||
</nav>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
</header>
|
||||
@@ -96,5 +96,8 @@ which a Git-connected project rejects. Push to `main` instead.
|
||||
content, pulled into `index.md` by `include_relative`, which reads excluded files
|
||||
fine — the exclusion only stops the raw markdown shipping as a duplicate page.
|
||||
- `404.html` is served automatically by both hosts for unmatched routes.
|
||||
- `_includes/header.html` overrides minima's header. The stock nav lists every page
|
||||
with a `title`, which put `404.html` in the menu as "Page not found"; the override
|
||||
shows a single GitHub link built from `repository` in `_config.yml`.
|
||||
- Ruby is pinned to the `3.4` series in both workflows rather than an exact patch.
|
||||
Cloudflare's own build image is irrelevant here, since Actions does the building.
|
||||
Reference in new issue
Block a user