Add example site

This commit is contained in:
Adnan Maolood 2020-11-20 15:06:11 -05:00
parent b4c3d7f442
commit 832aed7ff2
13 changed files with 86 additions and 0 deletions

3
example/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
/dst
/html/*
!/html/style.css

4
example/config.ini Normal file
View file

@ -0,0 +1,4 @@
title=Example Site
[feeds]
/blog/=Example Feed

15
example/html/style.css Normal file
View file

@ -0,0 +1,15 @@
body {
font-family: sans-serif;
padding: 2rem 1.25rem;
max-width: 600px;
margin: 0 auto;
}
p, h1, h2, h3, ul, pre {
margin: 0;
}
pre {
display: block;
overflow-x: auto;
}

3
example/src/about.gmi Normal file
View file

@ -0,0 +1,3 @@
# About this Site
This is an example site.

View file

@ -0,0 +1,3 @@
# Hello, world!
This is an example blog post.

View file

@ -0,0 +1,21 @@
# Example Post
This is an example blog post.
This is a paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
# Heading 1
## Heading 2
### Heading 3
=> gemini://gemini.circumlunar.space This is a link
```Some alt text
Some preformatted text
```
* A list item
* Another list item
* Yet another list item
> This is a quote. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

View file

@ -0,0 +1,5 @@
# Example Blog
Welcome to my example blog!
=> feed/ Feed

3
example/src/index.gmi Normal file
View file

@ -0,0 +1,3 @@
# Example Site
Welcome to my example site!

3
example/src/page.gmi Normal file
View file

@ -0,0 +1,3 @@
# Example Page
This is an example page.

View file

@ -0,0 +1,7 @@
# {{ .Title }}
Feed for {{ .Path }} on {{ site.Title }}.
Last updated on {{ .Updated.Format "2006-01-02" }}.
{{ range .Entries }}=> {{ .Path }} {{ .Date.Format "2006-01-02" }} {{ .Title }}
{{ end -}}

View file

@ -0,0 +1,9 @@
# {{ .Title }}
{{ if .Content }}{{ .Content }}{{ end }}
## Pages
{{ range .Pages }}=> {{ .Path }} {{ .Title }}
{{ end }}
## Directories
{{ range .Dirs }}=> {{ .Path }} {{ .Title }}
{{ end }}

View file

@ -0,0 +1,6 @@
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, intial-scale=1">
<link rel="stylesheet" href="/style.css">
<title>{{ .Title }}</title>
{{ .Content }}

View file

@ -0,0 +1,4 @@
# {{ .Title }}
{{ if not .Date.IsZero }}Posted on {{ .Date.Format "2006-01-02" }} on {{ site.Title }}.{{ end }}
{{ .Content }}