From ccc26c3a0bb65ae2613e222c3ead7f6db377b483 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Sat, 17 Sep 2022 11:41:20 -0400 Subject: More work on the editor and update the example site to utilize it. --- example-site/tpl/new-template.md | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 example-site/tpl/new-template.md (limited to 'example-site/tpl/new-template.md') diff --git a/example-site/tpl/new-template.md b/example-site/tpl/new-template.md new file mode 100644 index 0000000..c4fdd95 --- /dev/null +++ b/example-site/tpl/new-template.md @@ -0,0 +1,55 @@ +--- +# This is the contents of the `tpl/new-template.md` file. You're likely seeing +# This because you've created a new page, or are trying to edit a page that +# does not exist. To save yourself some confusion in the future, if you save +# This page it may be helpful to delete this first paragraph, as it will no +# longer be true. + +# This top section is YAML, this sets up a few of the variables for rendering +# a web page. Below is also some markdown that's executed as a go template +# for the page's content + +# You can edit this page by editing `tpl/new-template` If you changed the +# template directory, take that into account. + +# Controls whether or not the page is published, this includes the +# Atom/RSS feed +published: false +# What tags should be applied to this page? +# The default index/home page shows a list of published blog pages +tags: + Blog: +# This is the meta description, i.e. what you're going to seeing the little blurb +# if you post the link to in say a discord chat. It's also what shows up in +# Google and other search engines +description: >- + This is an example description. Note that the line starts with spaces, and + not tabs. +title: New page from `new-template` +# Used for the RSS/Atom feed, you can also use it in the template below +date: 09.11.2022 09:59:00 EDT + +# This line tells our server to stop parsing yaml and start processing +# the rest of the text file as a markdown template +|--- + +{{/* This is a comment inside of the template */}} + +{{/* + Print out the date, format information can be found here: + https://pkg.go.dev/time#pkg-constants +*/}} +`{{.Date.Time.Format "Monday January 2 2006"}}` + +# {{.Title}} + +Some documentation on the templating language can be found [here]( +https://pkg.go.dev/text/template) + + +A nice markdown reference can be found +[here](https://www.markdownguide.org/basic-syntax/) + + +Additionally html tags can be used in here as well. + -- cgit v1.2.3