-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Why: * when migrating from systems like jekylla and awestruct to hugo you might have hundreds if not thousands of blog entries using the filename as a way to set the date and slug part of page. i.e. 2017-08-01-my-life-as-a-dog.md would have a date of 2017-08-01 and a url called my-life-as-a-dog.md. This change addreses the need by: * introduce a setting called `useFilenameDateAsFallback` that defaults to true, which will derive date and slug from the filename. * fix bug where adjusting metadata defaults were ignored when page has no frontmatter
- Loading branch information
1 parent
7843d73
commit 74addc9
Showing
258 changed files
with
14,568 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src/node_modules | ||
node_modules | ||
.DS_Store | ||
*.log |
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 @@ | ||
Theme for gohugo.io sites. More info to come. |
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 @@ | ||
--- | ||
linktitle: "" | ||
description: "" | ||
godocref: "" | ||
publishdate: "" | ||
lastmod: "" | ||
categories: [] | ||
tags: [] | ||
weight: 00 | ||
slug: "" | ||
aliases: [] | ||
toc: false | ||
--- |
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 @@ | ||
--- | ||
linktitle: "" | ||
description: "" | ||
godocref: "" | ||
publishdate: "" | ||
lastmod: "" | ||
categories: [functions] | ||
tags: [] | ||
ns: "" | ||
signature: [] | ||
workson: [] | ||
hugoversion: "" | ||
aliases: [] | ||
relatedfuncs: [] | ||
toc: false | ||
deprecated: false | ||
--- |
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 @@ | ||
--- | ||
description: "" | ||
lastmod: "" | ||
license: "" | ||
licenseLink: "" | ||
sitelink: "" | ||
sourcelink: "" | ||
categories: [showcase] | ||
tags: [] | ||
image: "" | ||
toc: false | ||
notesforauthors: "Go to gohugo.io/contribute/documentation for more info" | ||
--- |
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,16 @@ | ||
--- | ||
linktitle: "" | ||
description: "" | ||
godocref: "" | ||
publishdate: "" | ||
lastmod: "" | ||
categories: [tutorials] | ||
tags: [] | ||
author: "" | ||
authorurl: "" | ||
originalurl: "" | ||
draft: false | ||
aliases: [] | ||
notesforauthors: "Go to gohugo.io/contribute/documentation for more info." | ||
--- | ||
|
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,10 @@ | ||
{{ define "main" }} | ||
<main class="cf pa5 pa4-l f4 tc center measure-wide lh-copy gray"> | ||
<h1 class="f3 f2-ns">The page you're looking for doesn't exist. Perhaps you'd like to gopher something else? Sorry.</h1> | ||
<div class="h6"> | ||
{{ partial "svg/gopher-hero.svg" . }} | ||
</div> | ||
|
||
{{ .Content }} | ||
</main> | ||
{{ 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,51 @@ | ||
<!DOCTYPE html> | ||
<html class="no-js" lang="{{ with $.Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}"> | ||
<head> | ||
<meta charset="utf-8"> | ||
{{/* https://www.zachleat.com/web/preload/ */}} | ||
<link rel="preload" href="{{ "files/muli-latin-200.woff2" | absURL }}" as="font" type="font/woff2" crossorigin> | ||
<link rel="preload" href="{{ "files/muli-latin-400.woff2" | absURL }}" as="font" type="font/woff2" crossorigin> | ||
<link rel="preload" href="{{ "files/muli-latin-800.woff2" | absURL }}" as="font" type="font/woff2" crossorigin> | ||
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
{{/* NOTE: the Site's title, and if there is a page title, that is set too */}} | ||
<title>{{ block "title" . }}{{ .Site.Title }} {{ with .Title }} | {{ . }}{{ end }}{{ end }}</title> | ||
<meta name="HandheldFriendly" content="True"> | ||
<meta name="MobileOptimized" content="320"> | ||
|
||
<meta name="viewport" content="width=device-width,minimum-scale=1"> | ||
{{ .Hugo.Generator }} | ||
|
||
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }} | ||
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW"> | ||
{{ else }} | ||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> | ||
{{ end }} | ||
|
||
<link href='{{ "dist/main.css" | relURL }}' rel='stylesheet' type="text/css" /> | ||
{{- partial "head-additions.html" . -}} | ||
{{- template "_internal/opengraph.html" . -}} | ||
{{- template "_internal/google_news.html" . -}} | ||
{{- template "_internal/schema.html" . -}} | ||
{{- partial "twitter_cards.html" . -}} | ||
|
||
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }} | ||
{{ template "_internal/google_analytics_async.html" . }} | ||
{{ end }} | ||
|
||
|
||
|
||
|
||
</head> | ||
<body class="ma0 sans-serif bg-primary-color-light{{ with getenv "HUGO_ENV" }} {{ . }}{{ end }}"> | ||
{{ block "nav" . }}{{ partial "site-nav.html" . }}{{ end }} | ||
{{ block "header" . }}{{ end }} | ||
<main role="main" class="content-with-sidebar min-vh-100 pb7 pb0-ns"> | ||
{{ block "main" . }}{{ end }} | ||
</main> | ||
|
||
{{ block "footer" . }}{{ partial "site-footer.html" . }}{{ end }} | ||
{{ block "scripts" . }}{{- partial "site-scripts.html" . -}}{{ end }} | ||
|
||
</body> | ||
</html> |
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,4 @@ | ||
{{ define "main" }} | ||
{{ $section_to_display := .Sections | default .Paginator.Pages }} | ||
{{ partial "pagelayout.html" (dict "context" . "section_to_display" $section_to_display ) }} | ||
{{ 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,37 @@ | ||
<header class="flex-none w-100"> | ||
{{ if .Params.categories }} | ||
{{ range .Params.categories }} | ||
<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" class="f6 fw8 mb0 link mid-gray dim mr3"> | ||
{{ humanize . | upper }} | ||
</a> | ||
{{ end }} | ||
{{end}} | ||
<h1 class="lh-title mb3 mv0 pt3 primary-color-dark"> | ||
{{- if eq .Section "functions" -}} | ||
{{ .LinkTitle }} | ||
{{- else -}} | ||
{{ .Title }} | ||
{{- end -}} | ||
</h1> | ||
</header> | ||
|
||
<aside class="bt bw1 pt3 mt2 mid-gray b--mid-gray fn w-100"> | ||
{{ with .Params.description }} | ||
<div class="f4 fw4 lh-copy"> | ||
{{ . | markdownify }} | ||
</div> | ||
{{ end }} | ||
|
||
<!-- | ||
NOTE: Removed to test builds without it. | ||
partial "components/author-github-data" (dict "context" . "size" "110") --> | ||
</aside> | ||
|
||
{{ with .Params.featured_image_path }} | ||
<img src="{{ . }}" alt="Featured Image for {{ $.Title }}" class="mw-100"> | ||
{{ end }} | ||
|
||
<div class="prose" id="prose"> | ||
{{- partial "docs/functions-signature.html" . -}} | ||
{{ .Content }} | ||
</div> |
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,30 @@ | ||
{{ define "main" }} | ||
<article class="w-100 ph4 pb5 pb6-ns pt1 pt5-ns"> | ||
<div class="flex-l"> | ||
|
||
<div class="order-2 w-100 w-20-l ph5-m ph0-l mb4 sticky"> | ||
{{- partial "toc.html" . -}} | ||
</div> | ||
|
||
<div class="order-1 w-60-l mw7 ph0 ph5-ns mid-gray nested-copy-line-height no-underline nested-links nested-img nested-copy-seperator nested-blockquote mt0-ns" style="flex-grow:1;"> | ||
<div class="documentation-copy center measure-wide-l"> | ||
<div id="readout" class="fixed right-0 bottom-0"> | ||
</div> | ||
{{ .Render "page" }} | ||
</div> | ||
</div> | ||
<div class="order-0 w-20 dn db-l"> | ||
{{ partial "nav-links-docs.html" . }} | ||
</div> | ||
|
||
</div> | ||
</article> | ||
|
||
<div class="w-100 bg-light-gray"> | ||
<div class="mw7 pa4 center nested-lh-copy lh-copy"> | ||
{{ partial "docs/page-meta-data.html" . }} | ||
{{ partial "page-edit.html" . }} | ||
{{ partial "tags.html" . }} | ||
</div> | ||
</div> | ||
{{ 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,4 @@ | ||
{{ define "main" }} | ||
{{ $section_to_display := .Data.Pages }} | ||
{{ partial "pagelayout.html" (dict "context" . "section_to_display" $section_to_display ) }} | ||
{{ 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,49 @@ | ||
{{/* {{ define "header" }}{{ partial "page-header" . }}{{ end }} */}} | ||
{{ define "main" }} | ||
{{ $section_to_display := .Data.Pages }} | ||
<div class="w-100 ph4 pb5 pb6-ns pt1 pt3-ns"> | ||
|
||
<div class="flex"> | ||
<div class="dn db-l w-20"> | ||
{{ partial "nav-links-docs.html" . }} | ||
</div> | ||
|
||
<div class="w-100 w-80-l ph0 ph4-l"> | ||
<article class="w-100 nested-copy-line-height nested-links nested-img"> | ||
<h1 class="primary-color-dark f2"> | ||
{{ .Title }} | ||
</h1> | ||
</article> | ||
<div class="pa3 pa4-ns w-100 v-top column-count-3-l column-gap-1-l"> | ||
{{ range $key, $value := .Data.Terms }} | ||
<div class="break-inside-avoid-l nested-copy-line-height mb5"> | ||
<h2 class="f3"> | ||
<a href="{{ "/" | relLangURL }}{{ $.Data.Plural | urlize }}/{{ $key | urlize }}" class="link black hover-blue"> | ||
{{ $key }} <span class="f6 gray"> ↗</span> | ||
</a> | ||
</h2> | ||
{{ range $value.Pages }} | ||
<h3> | ||
<a href="{{ .Permalink }}" class="link blue"> | ||
{{ .Title }} | ||
</a> | ||
</h3> | ||
{{ end }} | ||
</div> | ||
|
||
{{ end }} | ||
|
||
</div> | ||
|
||
|
||
|
||
|
||
</div> | ||
|
||
</div> | ||
|
||
|
||
|
||
|
||
</div> | ||
{{ 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,8 @@ | ||
/* | ||
X-Frame-Options: DENY | ||
X-XSS-Protection: 1; mode=block | ||
X-Content-Type-Options: nosniff | ||
Referrer-Policy: origin-when-cross-origin | ||
*/ | ||
Link: <{{ "dist/app.bundle.js" | relURL }}>; rel=preload; as=script | ||
Link: <{{ "dist/main.css" | relURL }}>; rel=preload; as=style |
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,23 @@ | ||
{{ define "header" }} | ||
{{ partial "hero" . }} | ||
{{ partial "boxes-small-news" . }} | ||
{{ end }} | ||
|
||
{{ define "main" }} | ||
|
||
<section class="w-100 ph4 ph5-ns pv4"> | ||
{{- partial "home-page-sections/features-icons" . -}} | ||
</section> | ||
|
||
{{- partial "home-page-sections/features-single" . -}} | ||
|
||
<section class="w-100 ph4 ph5-ns pv4 pv6-ns mid-gray bg-white bb bt b--light-gray"> | ||
{{- partial "home-page-sections/installation" . -}} | ||
</section> | ||
<section class="w-100 ph4 ph5-ns pv4 pv6-ns mid-gray bg-accent-color-dark"> | ||
{{- partial "home-page-sections/tweets" . -}} | ||
</section> | ||
<section class="w-100 ph4 ph5-ns pt4 pb5 mid-gray bg-primary-color-light bb bt b--light-gray "> | ||
{{- partial "home-page-sections/open-source-involvement" . -}} | ||
</section> | ||
{{ 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,6 @@ | ||
# Netlify redirects. See https://www.netlify.com/docs/redirects/ | ||
{{ range $p := .Site.Pages -}} | ||
{{ range .Aliases }} | ||
{{ . | printf "%-35s" }} {{ $p.RelPermalink -}} | ||
{{ 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,42 @@ | ||
{{/* TODO: think about adding these tags back in, but they need to be limited to news | ||
{{ define "header" }}{{ partial "page-header" . }}{{ end }} */}} | ||
{{ define "main" }} | ||
<div class="w-100 ph4 ph5-ns pb5 pb6-ns pt1 pt3-ns "> | ||
|
||
<article class="cf pa3 pa4-m pa4-l nested-copy-line-height nested-img"> | ||
<h1 class="primary-color-dark"> | ||
{{ .Title }} | ||
</h1> | ||
<div class="nested-copy-line-height"> | ||
{{ .Content }} | ||
</div> | ||
</article> | ||
|
||
<!-- TODO: May be a good idea in this case to add monthly archives --> | ||
|
||
<div class="flex flex-wrap"> | ||
{{/* [wip] add archive lists | ||
<div class="w-100 w-20-ns dn"> | ||
<ul> | ||
<li> | ||
<a href="#"> | ||
archive section | ||
</a> | ||
</li> | ||
</ul> | ||
</div> */}} | ||
|
||
{{ $interior_classes := $.Site.Params.flex_box_interior_classes }} | ||
<section class="flex-ns flex-wrap justify-between w-100 w-80-nsTK v-top"> | ||
{{ range .Paginator.Pages }} | ||
{{ partial "boxes-section-summaries" (dict "context" . "classes" $interior_classes "fullcontent" false) }} | ||
{{ end }} | ||
</section> | ||
</div> | ||
<div class="nested-list-reset nested-links"> | ||
{{/* pagination.html: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/template_embedded.go#L117 */}} | ||
{{ template "_internal/pagination.html" . }} | ||
</div> | ||
|
||
</div> | ||
{{ end }} |
Oops, something went wrong.