Initial commit
This commit is contained in:
commit
77d3ff4852
20 changed files with 645 additions and 0 deletions
6
site_templates/fs.go
Normal file
6
site_templates/fs.go
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
package site_templates
|
||||
|
||||
import "embed"
|
||||
|
||||
//go:embed *.html
|
||||
var FS embed.FS
|
||||
21
site_templates/layout_main.html
Normal file
21
site_templates/layout_main.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>My New Website</title>
|
||||
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Hello, world</h1>
|
||||
<p>Welcome to my website!</p>
|
||||
</header>
|
||||
|
||||
{{ .Body }}
|
||||
|
||||
<footer>
|
||||
<p>Test stuff</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
4
site_templates/posts_list.html
Normal file
4
site_templates/posts_list.html
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{{ range .Posts }}
|
||||
{{ .HTML }}
|
||||
<a href="{{ .Path }}">{{ format_date .Meta.Date }}</a>
|
||||
{{ end }}
|
||||
2
site_templates/posts_single.html
Normal file
2
site_templates/posts_single.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{{ .HTML }}
|
||||
<a href="{{ .Path }}">{{ format_date .Meta.Date }}</a>
|
||||
Loading…
Add table
Add a link
Reference in a new issue