Last active
October 5, 2024 00:31
-
-
Save dudung/18db690cb1c5c62463ef4bfc6a712226 to your computer and use it in GitHub Desktop.
Entry page of a Hugo site
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ define "main" }} | |
<main aria-role="main"> | |
<header class="homepage-header"> | |
<h1>from codes to granular systems</h1> | |
{{ with .Params.subtitle }} | |
<span class="subtitle">{{ . }}</span> | |
{{ end }} | |
</header> | |
<div class="homepage-content"> | |
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md --> | |
{{ .Content }} | |
</div> | |
{{ $max := len .Site.RegularPages }} | |
{{ $index := sub $max 1 }} | |
{{ range sort .Site.RegularPages ".Params.url" "desc" }} | |
{{ if ge $index 280 }} | |
<code style="color: #7b7;">{{ printf "%04d" $index }}</code> | |
<code> | |
<x style="color: #aaa;">{{ .Params.url }}</x> | |
{{/* .{{ printf "%04d" $index */}} | |
{{ dateFormat "02-Jan-2006" .Date }} | |
</code> | |
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> | |
{{ $index = sub $index 1 }} | |
{{ end }} | |
{{ end }} | |
{{ end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment