-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various changes around developer experience
* add .envrc to download latest version of hugo on macos and Linux * add list.html layout to support table-of-contents like view without manually updating announcements.md * put RSS link into header on Section pages * only build RSS for Section pages * remove deprecated taxonomyGroup keyword * add PR previews * support multiple types of content to list on /news/ page * rename /announcements/ to /news/ * setup redirects for all existing pages that would be affected
- Loading branch information
1 parent
4f40593
commit a2ddd14
Showing
21 changed files
with
278 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
source_up_if_exists | ||
|
||
PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]') | ||
|
||
test -d .bin || mkdir .bin | ||
|
||
HUGO_VERSION=0.120.3 | ||
case "$(uname -m)" in | ||
x86_64 | amd64) | ||
GOARCH="amd64" | ||
;; | ||
arm64 | aarch64) | ||
GOARCH="arm64" | ||
;; | ||
*) | ||
GOARCH="amd64" | ||
;; | ||
esac | ||
|
||
URL=https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_${PLATFORM}-${GOARCH}.tar.gz | ||
|
||
test -f .bin/hugo || curl -Lso - $URL | gzip -dc | tar -C .bin -x hugo | ||
|
||
PATH_add .bin |
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,37 @@ | ||
--- | ||
name: Deploy PR previews | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- closed | ||
|
||
concurrency: preview-${{ github.ref }} | ||
|
||
jobs: | ||
deploy-preview: | ||
runs-on: ubuntu-latest | ||
env: | ||
HUGO_VERSION: 0.115.4 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
|
||
- name: hugo | ||
uses: floryn90/actions-hugo@1.0.1 | ||
if: github.event.action != 'closed' | ||
with: | ||
version: 0.115.4 | ||
image: ext-alpine | ||
command: --minify --baseURL https://openela.github.io/openela.org/pr-preview/pr-${{ github.event.number }} | ||
|
||
- name: Deploy preview | ||
uses: rossjrw/pr-preview-action@v1 | ||
with: | ||
source-dir: ./public/ |
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 |
---|---|---|
|
@@ -11,3 +11,4 @@ hugo.exe | |
hugo.linux | ||
hugo.darwin | ||
|
||
.bin/* |
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
--- | ||
title: "{{ replace .Name "-" " " | title }}" | ||
date: {{ .Date }} | ||
slug: "{{ .Name }}" | ||
date: {{ .Date.Format "2024-03-04" }} | ||
author: YOUR NAME HERE | ||
draft: true | ||
--- | ||
|
This file was deleted.
Oops, something went wrong.
Empty file.
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,12 @@ | ||
--- | ||
title: My First Blog | ||
slug: my-first-blog | ||
date: 2024-04-05 | ||
type: blog | ||
tags: | ||
- engineering | ||
- software | ||
- upstream | ||
--- | ||
|
||
stuff and things |
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
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,9 @@ | ||
--- | ||
title: OpenELA News and Announcements | ||
include_footer: true | ||
sidebar: false | ||
aliases: | ||
- announcements/ | ||
--- | ||
|
||
Check out the latest announcements from OpenELA! |
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,11 @@ | ||
--- | ||
title: My First Blog | ||
slug: my-first-blog | ||
date: 2024-04-05 | ||
tags: | ||
- engineering | ||
- software | ||
- upstream | ||
--- | ||
|
||
stuff and things |
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,40 @@ | ||
{{ define "main" }} | ||
|
||
{{ partial "navbar.html" . }} | ||
{{ partial "navbar-clone.html" . }} | ||
|
||
|
||
<section class="section is-medium"> | ||
<div class="container"> | ||
<div class="columns"> | ||
<div class="column is-centered-tablet-portrait"> | ||
<h1 class="title section-title">{{ .Title }}</h1> | ||
<h5 class="subtitle is-5 is-muted">{{ .Params.Subtitle }}</h5> | ||
<div class="divider"></div> | ||
</div> | ||
</div> | ||
|
||
<div class="content"> | ||
{{ .Content }} | ||
<ul> | ||
<!-- Ranges through content/news/*.md --> | ||
{{ $pages := where .Site.RegularPages "Type" "in" (slice "blog" "news" "announcement") }} | ||
{{ range $pages.ByDate.Reverse }} | ||
<li> | ||
<a href="{{ .Permalink }}">{{if .Type }}<span class=postType>{{.Type}}</span>{{ end }}{{ .Title }}</a> (<em>{{ .Date.Format "January" }} {{ .Date.Format "2" }}{{ if in (slice 1 21 31) .Date.Day}}st{{ else if in (slice 2 22) .Date.Day}}nd{{ else if in (slice 3 23) .Date.Day}}rd{{ else }}th{{ end }}, {{ .Date.Format "2006" }}</em>) | ||
</li> | ||
{{ end }} | ||
</ul> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
{{ if .Params.include_footer }} | ||
{{ partial "footer.html" . }} | ||
{{ end }} | ||
|
||
{{ if .Params.sidebar }} | ||
{{ partial "single/sidebar.html" . }} | ||
{{ end }} | ||
|
||
{{ end }} |
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 @@ | ||
news |
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,45 @@ | ||
{{ define "main" }} | ||
|
||
{{ partial "navbar.html" . }} | ||
{{ partial "navbar-clone.html" . }} | ||
|
||
|
||
<section class="section is-medium"> | ||
<div class="container"> | ||
<article> | ||
<header> | ||
<div class="columns"> | ||
<div class="column is-centered-tablet-portrait"> | ||
<h1 class="title section-title">{{ .Title }}</h1> | ||
<h5 class="subtitle is-5 is-muted">{{ .Params.Subtitle }}</h5> | ||
<h6><strong>Published on:</strong> {{ .Date.Format "January 2, 2006" }}</h6> | ||
<h6><strong>Author:</strong> {{ default "The OpenELA Team" .Params.author }}</h6> | ||
<div class="divider"></div> | ||
</div> | ||
</div> | ||
</header> | ||
|
||
<section> | ||
<div class=content> | ||
{{ .Content }} | ||
</div> | ||
</section> | ||
|
||
<footer> | ||
{{ if .Params.tags }} | ||
<p>Tags: | ||
{{ range .Params.tags }} | ||
<a href="/tags/{{ . | urlize }}">{{ . }}</a> | ||
{{ end }} | ||
</p> | ||
{{ end }} | ||
</footer> | ||
</article> | ||
</div> | ||
</section> | ||
|
||
{{ partial "footer.html" . }} | ||
|
||
{{ partial "single/sidebar.html" . }} | ||
|
||
{{ end }} |
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,11 @@ | ||
{{ template "_internal/google_analytics.html" . }} | ||
{{ if eq .Site.Params.openGraph true }} | ||
{{ template "_internal/opengraph.html" . }} | ||
{{ end }} | ||
<meta name="description" content="{{ if .Params.summary }}{{ .Params.summary }}{{ else if .Site.Params.Description }}{{ .Site.Params.Description }}{{ else }}Hardcoded description; the author should update :){{ end }}" /> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<meta http-equiv="x-ua-compatible" content="ie=edge"> | ||
{{ with .OutputFormats.Get "rss" -}} | ||
{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }} | ||
{{ end }} |
Oops, something went wrong.