Skip to content

Commit 9222821

Browse files
committed
theme: improve initial page
which hopefully no one ever sees
1 parent 806de0b commit 9222821

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

layouts/partials/initial.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1+
{{- if or .IsHome (not .Title) }}
2+
{{- $title := .Site.Title }}
3+
{{- partial "heading-pre.html" . }}<h1 id="{{ $title | anchorize }}">{{ $title }}</h1>{{ partial "heading-post.html" . }}
4+
{{- end }}
5+
16
{{- partial "initial.md" . | markdownify }}

layouts/partials/initial.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
# Create this Page
1+
## Create this Page
22

33
You need to create a file for this page. You can either
44

5-
- create an _index.md, index.md or otherly named markdown file (depending on Hugo's bundle type) in *content* folder and fill it with Markdown content
6-
- create an *index.html* file in the <b>static</b> folder and fill the file with HTML content
5+
- create a file in the `content` folder and fill it with Markdown content
6+
- inside a folder named by the page's title like `<TITLE>/_index.md` or `<TITLE>/index.md`
7+
- named by the page's title like `<TITLE>.md`
8+
- create a file in the `static` folder and fill it with HTML content
9+
- inside a folder named by the page's title like `<TITLE>/index.html`

0 commit comments

Comments
 (0)