mirror of
https://github.com/theNewDynamic/awesome-hugo.git
synced 2025-02-02 17:04:41 -05:00
feat: create a simple website from README.md (WIP)
This commit is contained in:
parent
8b52d65d5e
commit
74fa848539
3
config.toml
Normal file
3
config.toml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
baseURL = "http://example.org/"
|
||||||
|
languageCode = "en-us"
|
||||||
|
title = "My New Hugo Site"
|
19
layouts/_default/baseof.html
Normal file
19
layouts/_default/baseof.html
Normal 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
11
layouts/index.html
Normal 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 }}
|
Loading…
x
Reference in New Issue
Block a user