aboutsummaryrefslogtreecommitdiff
path: root/example-site
diff options
context:
space:
mode:
Diffstat (limited to 'example-site')
-rw-r--r--example-site/404.md10
-rw-r--r--example-site/blog/first-post.md16
-rw-r--r--example-site/blog/second-post.md15
-rw-r--r--example-site/blog/unpublished-post.md22
-rw-r--r--example-site/checkup.md36
-rw-r--r--example-site/conf.yml20
-rw-r--r--example-site/inc/base.html51
-rw-r--r--example-site/index.md46
-rw-r--r--example-site/multi-tag-page.md20
-rw-r--r--example-site/reIndex.md22
-rw-r--r--example-site/static/style.css91
-rw-r--r--example-site/untagged-page.md14
12 files changed, 363 insertions, 0 deletions
diff --git a/example-site/404.md b/example-site/404.md
new file mode 100644
index 0000000..162233c
--- /dev/null
+++ b/example-site/404.md
@@ -0,0 +1,10 @@
+---
+title: 404 Not found | Example Website
+description: 404 Not found
+|---
+
+# 404 Not fonud!
+
+Whatever it is you were looking for, we have no idea what it was.
+
+Perhaps you'd like to go back [home](/)?
diff --git a/example-site/blog/first-post.md b/example-site/blog/first-post.md
new file mode 100644
index 0000000..f9c5ea2
--- /dev/null
+++ b/example-site/blog/first-post.md
@@ -0,0 +1,16 @@
+---
+title: 'Blog Post #1'
+description: My example description
+date: 07.02.2021 15:00:00 EDT
+published: true
+tags:
+ Blog:
+|---
+
+`{{.Date.Time.Format "Monday January 2 2006"}}`
+
+# {{.Title}}
+
+This is an example first blog post.
+
+Not much here.
diff --git a/example-site/blog/second-post.md b/example-site/blog/second-post.md
new file mode 100644
index 0000000..34fe318
--- /dev/null
+++ b/example-site/blog/second-post.md
@@ -0,0 +1,15 @@
+---
+title: 'Blog Post #2'
+description: My example description for blog post #2
+date: 07.14.2021 15:00:00 EDT
+published: true
+tags:
+ Blog:
+|---
+
+`{{.Date.Time.Format "Monday January 2 2006"}}`
+
+# {{.Title}}
+
+This is an example second blog post.
+
diff --git a/example-site/blog/unpublished-post.md b/example-site/blog/unpublished-post.md
new file mode 100644
index 0000000..3088250
--- /dev/null
+++ b/example-site/blog/unpublished-post.md
@@ -0,0 +1,22 @@
+---
+title: 'Unpublished Blog Post'
+description: My example description for an unpublished blog post
+date: 07.15.2021 15:00:00 EDT
+
+# Defaults to false
+# published: false
+
+tags:
+ Blog:
+|---
+
+`{{.Date.Time.Format "Monday January 2 2006"}}`
+
+# {{.Title}}
+
+This is an example unpublished blog post.
+
+Description:
+
+> {{.Description}}
+
diff --git a/example-site/checkup.md b/example-site/checkup.md
new file mode 100644
index 0000000..622d836
--- /dev/null
+++ b/example-site/checkup.md
@@ -0,0 +1,36 @@
+---
+title: Example checkup page
+description: Showing the output of one of the internal checkup mechanisms
+
+|---
+
+# {{.Title}}
+
+# Status
+
+Current statuses:
+```
+{{range $key, $val := .Checkup}}{{$key}}
+{{end}}
+```
+
+{{range $key, $val := .Checkup}}
+## {{$key}}:
+{{range $page := $val}}
+```
+{{$page}}
+{{$.EncodeYaml $page}}
+```
+{{end}}
+{{end}}
+
+
+<!--
+
+## Raw
+
+```
+{{.EncodeYaml .Checkup}}
+```
+
+-->
diff --git a/example-site/conf.yml b/example-site/conf.yml
new file mode 100644
index 0000000..b6f0202
--- /dev/null
+++ b/example-site/conf.yml
@@ -0,0 +1,20 @@
+# All these can be unset
+reindexpath: /reIndex
+staticdirectory: static
+basetemplate: inc/base.html
+documentsplit: "|---\n"
+suffix: ".md"
+
+# Used by the feeds handler
+title: "My Example Website!"
+description: >
+ An example website powered by markdown, yaml and some clever templating
+author:
+ name: "Example Author"
+ # uri: "https://example.com" # Not required
+ # email: "author@example.com" # Not required
+# Change this to your actual website URI, e.g. https://example.com
+siteurl: "http://localhost:8080"
+feedid: "changeme"
+updated: 07.13.2021 19:51:00 EDT
+feedprefix: .feeds
diff --git a/example-site/inc/base.html b/example-site/inc/base.html
new file mode 100644
index 0000000..2f93ec7
--- /dev/null
+++ b/example-site/inc/base.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+
+ <link id="maincss" rel="stylesheet" href="/static/style.css" defer>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ {{if .AuthorName }}
+ <meta name="author" content="{{.AuthorName}}">
+ {{else if .Global.App.Author.Name }}
+ <meta name="author" content="{{.Global.App.Author.Name}}">
+ {{else}}
+ {{end}}
+
+{{if .Title}}
+ <title>{{.Title}}</title>
+{{else}}
+ <title>Please change me!</title>
+{{end}}
+
+{{if .Description}}
+ <meta name="description" content="{{.Description}}">
+{{else}}
+ <meta name="description" content="Draft and or Preview page. Default Description.">
+{{end}}
+
+</head>
+
+<body>
+
+{{if .Description}}{{else}}
+ <h1>
+ <span style="color: red;">
+ This is a draft, preview or otherwise unfinished page.
+ </span>
+ </h1>
+{{end}}
+
+<nav>
+ <a href="/">Home</a>
+
+ <div style="display: block; float: right;">
+ <a href="#">Git</a>
+ </div>
+</nav>
+
+{{.RenderBody}}
+
+</body>
diff --git a/example-site/index.md b/example-site/index.md
new file mode 100644
index 0000000..f9f8fa8
--- /dev/null
+++ b/example-site/index.md
@@ -0,0 +1,46 @@
+---
+title: Example website home page
+description: My example description
+
+|---
+
+# {{.Title}}
+
+Example paragraph. This website utilizes Go's templates, a Blackfriday markdown
+renderer and some yaml at the top of each file to provide some information about
+it.
+
+`code style text`
+
+ * [reIndex page]({{.Global.App.ReIndexPath}})
+ * [404 Page](/some/path/that/does/not/exist/at/all)
+ * [Example checkup page](/checkup)
+
+
+## Recent Blog Entries:
+
+[Atom Feed](/{{.Global.App.FeedPrefix}}/Blog?limit=5&content)
+
+{{range $val := .Index.Blog.SortDate}}
+ * [{{$val.Date.Time.Format "2006-01-02"}} {{$val.Title}}]({{$val.Path}}){{end}}
+
+## Published Blog Entries:
+
+{{range $val := .Index.Blog.SortDate}}{{if $val.Published}}
+ * [{{$val.Date.Time.Format "2006-01-02"}} * {{$val.Title}}]({{$val.Path}}){{end}}{{end}}
+
+## Some internals
+
+
+#### Global vars:
+
+```
+{{.EncodeYaml .Global}}
+```
+
+#### Page Index ( details )
+
+```
+{{.EncodeYaml .Index}}
+```
+
diff --git a/example-site/multi-tag-page.md b/example-site/multi-tag-page.md
new file mode 100644
index 0000000..6e3b4f6
--- /dev/null
+++ b/example-site/multi-tag-page.md
@@ -0,0 +1,20 @@
+---
+title: Multi tag page
+description: A page with several tags added to it
+date: 07.02.2021 15:00:00 EDT
+authorname: Someone Else
+# authoremail: someoneelse@example.com
+published: true
+tags:
+ Blog:
+ Automotive:
+ MoarTags:
+|---
+
+`{{.Date.Time.Format "Monday January 2 2006"}}`
+
+# {{.Title}}
+
+
+Just a sample page with several tags
+
diff --git a/example-site/reIndex.md b/example-site/reIndex.md
new file mode 100644
index 0000000..4519dc5
--- /dev/null
+++ b/example-site/reIndex.md
@@ -0,0 +1,22 @@
+---
+title: reIndex page
+description: >
+ This page is rendered after reindexing, with any encountered errors!
+|---
+
+# {{.Title}}
+
+this is the reindex page
+
+{{if .Vars.IndexError}}
+<span style="color: red;">
+# Indexing Error: {{.Vars.IndexError}}
+</span>
+{{end}}
+
+
+```
+This handler adds some information to the page vars:
+{{.Vars}}
+```
+
diff --git a/example-site/static/style.css b/example-site/static/style.css
new file mode 100644
index 0000000..158444b
--- /dev/null
+++ b/example-site/static/style.css
@@ -0,0 +1,91 @@
+nav {
+ border-bottom: 3px solid #000;
+ padding-bottom: 10px;
+}
+a {
+ text-decoration: none;
+}
+a:hover {
+ text-decoration: underline;
+}
+
+code {
+ background-color: #afafaf;
+ padding: 2px;
+ font-size: .8em;
+ font-family: "Roboto Mono", "Monaco", "Lucida Console", "DejaVu Sans Mono", "monospace";
+}
+
+pre code {
+ color: #000;
+ background-color: #fafafa;
+ display: block;
+ padding: 10px;
+ border: 1px solid;
+ line-height: 1.1;
+ overflow: auto;
+}
+
+
+blockquote {
+ border-left: 4px solid #aaa;
+ padding-left: 1em;
+}
+
+/*
+ * The following was shamelessly ripped from:
+ * http://bettermotherfuckingwebsite.com/
+ * And subsequently modified to suit my needs
+ */
+
+body {
+ margin: 40px auto;
+ max-width: 80%;
+ line-height: 1.6;
+ font-size: 1em;
+ color: #444;
+ padding: 0 10px;
+ /* Added because some browsers don't default to white */
+ background-color: #fff;
+}
+
+img {
+ width: 100%;
+ height: auto;
+}
+
+h1,h2,h3 {
+ line-height: 1.2
+}
+
+@media screen and (min-width: 960px) {
+ body {
+ max-width: 768px;
+ }
+}
+
+@media print {
+ a, a:visited {
+ color: #000;
+ }
+ nav {
+ display: none;
+ }
+ body {
+ background-color: transparent;
+ line-height: 1;
+ font-size: 10pt;
+ /* margin: 5px auto; */
+ margin: 5px 5px 5px 5px;
+ max-width: 100%;
+ }
+
+ pre code {
+ color: #000;
+ background-color: inherit;
+ display: block;
+ padding: 10px;
+ border: none;
+ }
+
+}
diff --git a/example-site/untagged-page.md b/example-site/untagged-page.md
new file mode 100644
index 0000000..c55274e
--- /dev/null
+++ b/example-site/untagged-page.md
@@ -0,0 +1,14 @@
+---
+title: Untagged page
+description: A page with no tags added to it
+date: 07.02.2021 15:00:00 EDT
+published: true
+tags:
+|---
+
+`{{.Date.Time.Format "Monday January 2 2006"}}`
+
+# {{.Title}}
+
+
+Just a sample page with no tags