-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Title to hugo.yaml and modify navbar to use it navbar.html by defalut puts the title on every page. This update modifies it to not put the title on the home page. The title already is a central part of the text within the page and having it on the home page is redundant. Defining the title in the config comes in useful for other Hugo templates that want to use the title of the website. * Add RSS Feed to History, Software and Project pages. RSS Feed generates feed containing all subpages from these sections. * Add rss Feed to Footer Update rssFeed url value to project/status page Add frontmatter and enable git info These changes allow us to get the last modified date for pages. Update page-meta-lastmod file to not show git commit info * Update config files to rename RSS Feed to rss.xml * Update title and description lines Title and Description are set to Updates from the Medley Interlisp Project.
- Loading branch information
Showing
7 changed files
with
197 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{{- $authorName := "" }} | ||
{{- with .Site.Params.author }} | ||
{{- if reflect.IsMap . }} | ||
{{- with .name }} | ||
{{- $authorName = . }} | ||
{{- end }} | ||
{{- else }} | ||
{{- $authorName = . }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- $pctx := . }} | ||
{{- if .IsHome }}{{ $pctx = .Site }}{{ end }} | ||
|
||
<!-- Iterate through all sections and include both sections and | ||
pages in the rss feed. The default rss.xml only includes | ||
pages. --> | ||
{{- $pages := slice }} | ||
{{- $mainPages := where .Pages "Kind" "in" (slice "page" "section") }} | ||
{{- $pages = $pages | union $mainPages }} | ||
|
||
{{- range .Sections }} | ||
{{- $sectionPages := where .Pages "Kind" "in" (slice "page" "section") }} | ||
{{- $pages = $pages | union $sectionPages }} | ||
{{- range .Sections }} | ||
{{- $subSectionPages := where .Pages "Kind" "in" (slice "page" "section") }} | ||
{{- $pages = $pages | union $subSectionPages }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- $limit := .Site.Config.Services.RSS.Limit }} | ||
{{- if ge $limit 1 }} | ||
{{- $pages = $pages | first $limit }} | ||
{{- end }} | ||
|
||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> | ||
<channel> | ||
<title>Updates from the Medley Interlisp Project</title> | ||
<link>{{ .Permalink }}</link> | ||
<description>Updates from the Medley Interlisp Project</description> | ||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} | ||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }} | ||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} | ||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} | ||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} | ||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} | ||
{{ with .OutputFormats.Get "RSS" }} | ||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} | ||
{{ end }} | ||
{{ range $pages }} | ||
<item> | ||
<title>{{ .Title }}</title> | ||
<link>{{ .Permalink }}</link> | ||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> | ||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} | ||
<guid>{{ .Permalink }}</guid> | ||
<description>{{ .Summary | html }}</description> | ||
{{ range .Params.tags }} | ||
<category>{{ . }}</category> | ||
{{ end }} | ||
</item> | ||
{{ end }} | ||
</channel> | ||
</rss> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<ul class="td-footer__links-list"> | ||
{{ range . }} | ||
{{ if eq .name "RSS Feed" }} | ||
<li class="td-footer__links-item" data-bs-toggle="tooltip" title="RSS" aria-label="RSS"> | ||
<a target="_blank" rel="noopener" href="{{ absURL .url }}" aria-label="RSS"> | ||
<i class="fas fa-rss"></i> | ||
</a> | ||
</li> | ||
{{ else }} | ||
<li class="td-footer__links-item" data-bs-toggle="tooltip" title="{{ .name }}" aria-label="{{ .name }}"> | ||
<a target="_blank" rel="noopener" href="{{ .url }}" aria-label="{{ .name }}"> | ||
<i class="{{ .icon }}"></i> | ||
</a> | ||
{{ end }} | ||
{{ end }} | ||
|
||
</ul> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{{ $cover := and | ||
(.HasShortcode "blocks/cover") | ||
(not .Site.Params.ui.navbar_translucent_over_cover_disable) | ||
-}} | ||
{{ $baseURL := urls.Parse $.Site.Params.Baseurl -}} | ||
|
||
<nav class="td-navbar js-navbar-scroll | ||
{{- if $cover }} td-navbar-cover {{- end }}" data-bs-theme="dark"> | ||
<div class="container-fluid flex-column flex-md-row"> | ||
<a class="navbar-brand" href="{{ .Site.Home.RelPermalink }}"> | ||
{{- /**/ -}} | ||
<span class="navbar-brand__logo navbar-logo"> | ||
{{- if ne .Site.Params.ui.navbar_logo false -}} | ||
{{ with resources.Get "icons/logo.svg" -}} | ||
{{ ( . | minify).Content | safeHTML -}} | ||
{{ end -}} | ||
{{ end -}} | ||
</span> | ||
{{- /**/ -}} | ||
<span class="navbar-brand__name"> | ||
<!-- Place the site title on every page header, except the home page --> | ||
{{ if not .IsHome }} | ||
{{ .Site.Title }} | ||
{{ end }} | ||
|
||
</span> | ||
{{- /**/ -}} | ||
</a> | ||
<div class="td-navbar-nav-scroll ms-md-auto" id="main_navbar"> | ||
<ul class="navbar-nav"> | ||
{{ $p := . -}} | ||
{{ range .Site.Menus.main -}} | ||
<li class="nav-item"> | ||
{{ $active := or ($p.IsMenuCurrent "main" .) ($p.HasMenuCurrent "main" .) -}} | ||
{{ $href := "" -}} | ||
{{ with .Page -}} | ||
{{ $active = or $active ( $.IsDescendant .) -}} | ||
{{ $href = .RelPermalink -}} | ||
{{ else -}} | ||
{{ $href = .URL | relLangURL -}} | ||
{{ end -}} | ||
{{ $isExternal := ne $baseURL.Host (urls.Parse .URL).Host -}} | ||
<a {{/**/ -}} | ||
class="nav-link {{- if $active }} active {{- end }}" {{/**/ -}} | ||
href="{{ $href }}" | ||
{{- if $isExternal }} target="_blank" rel="noopener" {{- end -}} | ||
> | ||
{{- .Pre -}} | ||
<span>{{ .Name }}</span> | ||
{{- .Post -}} | ||
</a> | ||
</li> | ||
{{ end -}} | ||
{{ if .Site.Params.versions -}} | ||
<li class="nav-item dropdown d-none d-lg-block"> | ||
{{ partial "navbar-version-selector.html" . -}} | ||
</li> | ||
{{ end -}} | ||
{{ if (gt (len .Site.Home.Translations) 0) -}} | ||
<li class="nav-item dropdown d-none d-lg-block"> | ||
{{ partial "navbar-lang-selector.html" . -}} | ||
</li> | ||
{{ end -}} | ||
{{ if .Site.Params.ui.showLightDarkModeMenu -}} | ||
<li class="td-light-dark-menu nav-item dropdown"> | ||
{{ partial "theme-toggler" . }} | ||
</li> | ||
{{ end -}} | ||
</ul> | ||
</div> | ||
<div class="d-none d-lg-block"> | ||
{{ partial "search-input.html" . }} | ||
</div> | ||
</div> | ||
</nav> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{ if and .GitInfo .Site.Params.github_repo -}} | ||
<div class="td-page-meta__lastmod"> | ||
<!-- | ||
Disable showing of Git Commit info in the footer | ||
{{ T "post_last_mod" }} {{ .Lastmod.Format .Site.Params.time_format_default -}} | ||
{{ with .GitInfo }}: {{/* Trim WS */ -}} | ||
<a data-proofer-ignore href="{{ $.Site.Params.github_repo }}/commit/{{ .Hash }}"> | ||
{{- .Subject }} ({{ .AbbreviatedHash }}) {{- /* Trim WS */ -}} | ||
</a> | ||
{{- end }} | ||
--> | ||
</div> | ||
{{ end -}} |