Skip to content

Commit

Permalink
Order all pages by weight, date, title
Browse files Browse the repository at this point in the history
  • Loading branch information
willfaught committed Jun 10, 2024
1 parent 7d6da80 commit bf692c9
Show file tree
Hide file tree
Showing 18 changed files with 118 additions and 118 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,6 @@ Parameters specific to pages:
```toml
link = "https://youtu.be/dQw4w9WgXcQ" # The reference for an anchor around the title
[paige]
pin = true # Order this page before the rest
[paige.alert]
message = "Alert!" # Markdown displayed before the page body
type = "primary" # Bootstrap alert class
Expand Down Expand Up @@ -943,8 +940,6 @@ Page and sub-page classes:
<dd>The authors.</dd>
<dt><code>.paige-date</code></dt>
<dd>The date.</dd>
<dt><code>.paige-date-header</code></dt>
<dd>The date headers.</dd>
<dt><code>.paige-description</code></dt>
<dd>The description.</dd>
<dt><code>.paige-keyword</code></dt>
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/content/alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ paige:
type: "primary"
tags: ["alerts"]
title: "Alert"
weight: 60
weight: 30
---

This page has the following parameters:
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/content/emoji-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ date: "2023-09-18T21:32:40-07:00"
description: "Guide to emoji usage in Hugo."
tags: ["emoji"]
title: "Emoji Support"
weight: 50
weight: 40
---

<!--
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/content/link.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: "A front matter link."
link: "https://willfaught.com/paige"
tags: ["link"]
title: "Link"
weight: 70
weight: 20
---

It takes you to the home page.
2 changes: 1 addition & 1 deletion exampleSite/content/content/markdown-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ date: "2023-09-18T21:32:52-07:00"
description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
tags: ["markdown", "css", "html"]
title: "Markdown Syntax Guide"
weight: 10
weight: 80
---

<!--
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/content/math-typesetting.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ paige:
math: true
tags: ["katex", "math", "typesetting"]
title: "Math Typesetting"
weight: 40
weight: 50
---

<!--
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/content/placeholder-text.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ paige:
hide_page: true
tags: ["markdown", "text"]
title: "Placeholder Text"
weight: 30
weight: 60
---

<!--
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/content/rich-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ paige:
hide_page: true
tags: ["shortcodes", "privacy"]
title: "Rich Content"
weight: 20
weight: 70
---

<!--
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/content/video.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ date: "2023-09-24T21:29:31-07:00"
description: "Only a video."
tags: ["video"]
title: "Video"
weight: 80
weight: 10
---

{{< paige/youtube "dQw4w9WgXcQ" >}}
2 changes: 0 additions & 2 deletions exampleSite/content/customization/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ paige:
#paige-toc,
.paige-authors,
.paige-date,
.paige-date-header,
.paige-keywords,
.paige-reading-time,
.paige-series,
Expand Down Expand Up @@ -49,7 +48,6 @@ paige:
#paige-toc,
.paige-authors,
.paige-date,
.paige-date-header,
.paige-keywords,
.paige-reading-time,
.paige-series,
Expand Down
4 changes: 1 addition & 3 deletions exampleSite/content/customization/show.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ paige:
#paige-toc,
.paige-authors,
.paige-date,
.paige-date-header,
.paige-keywords,
.paige-reading-time,
.paige-series,
Expand All @@ -26,7 +25,7 @@ paige:
series: ["series-demo"]
tags: ["show", "singles"]
title: "Show Data"
weight: 10
weight: 20
---

This site hides some single page data by default. This page shows it all.
Expand All @@ -53,7 +52,6 @@ paige:
#paige-toc,
.paige-authors,
.paige-date,
.paige-date-header,
.paige-keywords,
.paige-reading-time,
.paige-series,
Expand Down
6 changes: 1 addition & 5 deletions exampleSite/content/customization/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ paige:
#paige-toc,
.paige-authors,
.paige-date,
.paige-date-header,
.paige-keywords,
.paige-reading-time,
.paige-series,
Expand All @@ -37,14 +36,13 @@ paige:
#paige-credit { font-style: italic; }
.paige-authors { font-style: italic; }
.paige-date { font-style: italic; }
.paige-date-header { font-style: italic; }
.paige-keyword { font-style: italic; }
.paige-series { font-style: italic; }
.paige-summary { font-style: italic; }
series: ["series-demo"]
tags: ["singles", "style"]
title: "Style Data"
weight: 20
weight: 10
---

This site uses the default styles on the other pages. This page changes them.
Expand All @@ -71,7 +69,6 @@ paige:
#paige-toc,
.paige-authors,
.paige-date,
.paige-date-header,
.paige-keywords,
.paige-reading-time,
.paige-series,
Expand All @@ -92,7 +89,6 @@ paige:
#paige-credit { font-style: italic; }
.paige-authors { font-style: italic; }
.paige-date { font-style: italic; }
.paige-date-header { font-style: italic; }
.paige-keyword { font-style: italic; }
.paige-series { font-style: italic; }
.paige-summary { font-style: italic; }
Expand Down
1 change: 0 additions & 1 deletion exampleSite/layouts/partials/paige/style-first.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#paige-toc,
.paige-authors,
.paige-date,
.paige-date-header,
.paige-keywords,
.paige-reading-time,
.paige-series,
Expand Down
3 changes: 0 additions & 3 deletions i18n/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ paige_noscript:
paige_pages:
other: Seiten

paige_pinned_page:
other: Angeheftete seite

paige_search_button:
other: Suche

Expand Down
3 changes: 0 additions & 3 deletions i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ paige_page_list_navigation:
paige_pages:
other: Pages

paige_pinned_page:
other: Pinned page

paige_previous:
other: Previous

Expand Down
3 changes: 0 additions & 3 deletions i18n/zh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ paige_noscript:
paige_pages:
other: 页数

paige_pinned_page:
other: 固定页面

paige_search_button:
other: 搜索

Expand Down
3 changes: 1 addition & 2 deletions layouts/partials/paige/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
{{ $flags := slice }}
{{ $future := and $page.PublishDate (gt $page.PublishDate now) }}
{{ $modified := and $page.PublishDate $page.Lastmod (lt $page.PublishDate $page.Lastmod) }}
{{ $pinned := $page.Params.paige.pin }}
{{ $readingtime := $page.ReadingTime }}
{{ $series := $page.GetTerms "series" }}
{{ $summary := $page.Summary | markdownify | plainify | htmlUnescape }}
Expand Down Expand Up @@ -44,7 +43,7 @@

<div class="{{ $class }}">
{{ with $title }}
<p class="mb-0 paige-title text-center">{{ if $pinned -}} <i class="bi bi-pin-fill text-secondary" style="margin-left: -2.5ch; position: absolute"><span class="visually-hidden">{{ i18n "paige_pinned_page" }}</span></i> {{ end }}<a href="{{ $titlelink }}">{{ . }}</a></p>
<p class="mb-0 paige-title text-center"><a href="{{ $titlelink }}">{{ . }}</a></p>
{{ end }}

{{ with $description }}
Expand Down
Loading

0 comments on commit bf692c9

Please sign in to comment.