diff --git a/example/.gitignore b/example/.gitignore new file mode 100644 index 0000000..c613463 --- /dev/null +++ b/example/.gitignore @@ -0,0 +1,3 @@ +/dst +/html/* +!/html/style.css diff --git a/example/config.ini b/example/config.ini new file mode 100644 index 0000000..10a7f54 --- /dev/null +++ b/example/config.ini @@ -0,0 +1,4 @@ +title=Example Site + +[feeds] +/blog/=Example Feed diff --git a/example/html/style.css b/example/html/style.css new file mode 100644 index 0000000..8583883 --- /dev/null +++ b/example/html/style.css @@ -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; +} diff --git a/example/src/about.gmi b/example/src/about.gmi new file mode 100644 index 0000000..1259d82 --- /dev/null +++ b/example/src/about.gmi @@ -0,0 +1,3 @@ +# About this Site + +This is an example site. diff --git a/example/src/blog/2020-11-19-Hello-world.gmi b/example/src/blog/2020-11-19-Hello-world.gmi new file mode 100644 index 0000000..890f6b0 --- /dev/null +++ b/example/src/blog/2020-11-19-Hello-world.gmi @@ -0,0 +1,3 @@ +# Hello, world! + +This is an example blog post. diff --git a/example/src/blog/2020-11-20-Example-post.gmi b/example/src/blog/2020-11-20-Example-post.gmi new file mode 100644 index 0000000..7bee21b --- /dev/null +++ b/example/src/blog/2020-11-20-Example-post.gmi @@ -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. diff --git a/example/src/blog/index.gmi b/example/src/blog/index.gmi new file mode 100644 index 0000000..80cff14 --- /dev/null +++ b/example/src/blog/index.gmi @@ -0,0 +1,5 @@ +# Example Blog + +Welcome to my example blog! + +=> feed/ Feed diff --git a/example/src/index.gmi b/example/src/index.gmi new file mode 100644 index 0000000..f0ad9ab --- /dev/null +++ b/example/src/index.gmi @@ -0,0 +1,3 @@ +# Example Site + +Welcome to my example site! diff --git a/example/src/page.gmi b/example/src/page.gmi new file mode 100644 index 0000000..2c8b998 --- /dev/null +++ b/example/src/page.gmi @@ -0,0 +1,3 @@ +# Example Page + +This is an example page. diff --git a/example/templates/feed.gmi b/example/templates/feed.gmi new file mode 100644 index 0000000..00f9be4 --- /dev/null +++ b/example/templates/feed.gmi @@ -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 -}} diff --git a/example/templates/index.gmi b/example/templates/index.gmi new file mode 100644 index 0000000..68f1df5 --- /dev/null +++ b/example/templates/index.gmi @@ -0,0 +1,9 @@ +# {{ .Title }} + +{{ if .Content }}{{ .Content }}{{ end }} +## Pages +{{ range .Pages }}=> {{ .Path }} {{ .Title }} +{{ end }} +## Directories +{{ range .Dirs }}=> {{ .Path }} {{ .Title }} +{{ end }} diff --git a/example/templates/output.html b/example/templates/output.html new file mode 100644 index 0000000..8cd377e --- /dev/null +++ b/example/templates/output.html @@ -0,0 +1,6 @@ + + + +