feat: create a simple website from README.md (WIP)

This commit is contained in:
Patrick Kollitsch 2020-09-25 20:36:26 +07:00
parent 8b52d65d5e
commit 74fa848539
No known key found for this signature in database
GPG Key ID: 22E2ACCFF7E3174A
3 changed files with 33 additions and 0 deletions

3
config.toml Normal file
View File

@ -0,0 +1,3 @@
baseURL = "http://example.org/"
languageCode = "en-us"
title = "My New Hugo Site"

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{{ block "title" . }}
<!-- Blocks may include default content. -->
{{ .Site.Title }}
{{ end }}</title>
</head>
<body>
<!-- Code that all your templates share, like a header -->
{{ block "main" . }}
<!-- The part of the page that begins to differ between templates -->
{{ end }}
{{ block "footer" . }}
<!-- More shared code, perhaps a footer but that can be overridden if need be in -->
{{ end }}
</body>
</html>

11
layouts/index.html Normal file
View File

@ -0,0 +1,11 @@
{{ define "main" }}
<main aria-role="main">
<header class="homepage-header">
<h1>{{.Title}}</h1>
{{ with .Params.subtitle }}
<span class="subtitle">{{.}}</span>
{{ end }}
</header>
{{ readFile "README.md" | markdownify }}
</main>
{{ end }}