From e13df26c715f17686fbae1e709a3115ac7377df8 Mon Sep 17 00:00:00 2001 From: Jan Raasch Date: Fri, 4 Sep 2020 08:54:19 +0200 Subject: refactor: move (non-post) pages to "content"-root --- README.md | 19 ++++++++++++++++--- archetypes/blog.md | 13 +++++++++++++ archetypes/default.md | 17 +++++++++++++++-- exampleSite/content/bear.md | 18 ++++++++++++++++++ exampleSite/content/blog/bear.md | 25 ------------------------- exampleSite/content/blog/hugo.md | 31 ------------------------------- exampleSite/content/hugo.md | 26 ++++++++++++++++++++++++++ 7 files changed, 88 insertions(+), 61 deletions(-) create mode 100644 archetypes/blog.md create mode 100644 exampleSite/content/bear.md delete mode 100644 exampleSite/content/blog/bear.md delete mode 100644 exampleSite/content/blog/hugo.md create mode 100644 exampleSite/content/hugo.md diff --git a/README.md b/README.md index e679dfa..2c0764a 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,23 @@ Please check out the [config.toml](https://github.com/janraasch/hugo-bearblog/bl If you are starting fresh, simply copy over the contents of the `exampleSite`-directory included in this theme to your source directory. That should give you a good idea about how things work, and then you can go on from there to make the site your own. -### Adding content +### Adding / editing content -You can add **a new post/page** via running +#### Index-Page + +The contents of the `index`-page may be changed by editing your `content/_index.md`-file. + +#### Page + +You can add **a new page** via running + +``` +hugo new my-new-page.md +``` + +#### Blog-Post + +You can add **a new blog-post** via running ``` hugo new blog/my-new-post.md @@ -63,5 +77,4 @@ A special thank you goes out to [Herman](https://herman.bearblog.dev), for creat [paypal-dot-me]: https://www.paypal.me/janraasch/7,00 [github-sponsors]: https://github.com/sponsors/janraasch [insert-coins-svg]: https://img.shields.io/badge/insert-coins-11dde2.svg - [hugo-setup-guide]: https://gohugo.io/getting-started/installing diff --git a/archetypes/blog.md b/archetypes/blog.md new file mode 100644 index 0000000..e4594c6 --- /dev/null +++ b/archetypes/blog.md @@ -0,0 +1,13 @@ ++++ +title = "{{ replace .Name "-" " " | title }}" +date = "{{ .Date }}" + +# +# description is optional +# +# description = "An optional description for SEO. If not provided, an automatically created summary will be used." + +tags = [{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}"{{ printf "%s" $term }}",{{ end }}{{ end }}] ++++ + +This is a page about »{{ replace .Name "-" " " | title }}«. diff --git a/archetypes/default.md b/archetypes/default.md index ed40bd4..e8406b3 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,9 +1,22 @@ +++ title = "{{ replace .Name "-" " " | title }}" date = "{{ .Date }}" + +# +# Set menu to "main" to add this page to +# the main menu on top of the page +# +menu = "main" + +# +# description is optional +# # description = "An optional description for SEO. If not provided, an automatically created summary will be used." -# menu = "main" -tags = [{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}"{{ printf "%s" $term }}",{{ end }}{{ end }}] + +# +# tags are optional +# +# tags = [{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}"{{ printf "%s" $term }}",{{ end }}{{ end }}] +++ This is a page about »{{ replace .Name "-" " " | title }}«. diff --git a/exampleSite/content/bear.md b/exampleSite/content/bear.md new file mode 100644 index 0000000..a25a2dc --- /dev/null +++ b/exampleSite/content/bear.md @@ -0,0 +1,18 @@ ++++ +title = "Bear" +menu = "main" ++++ + +# Bear + +Website: https://bearblog.dev + +There is a website obesity crisis. Bloated websites are full of scripts, ads, and trackers slowing your readers down every time they try to read your well-crafted content. + +Bear is all you need to build a fantastic and optimized site or blog. It works perfectly on **any** viewing device. All you need to focus on is writing good content. + +Bear makes it simple to publish content online and grow an audience while keeping pages tiny, fast, and **optimized for search engines.** + +Each page is ~5kb. + +Learn more and contribute on [GitHub](https://github.com/HermanMartinus/bearblog). diff --git a/exampleSite/content/blog/bear.md b/exampleSite/content/blog/bear.md deleted file mode 100644 index 83691e5..0000000 --- a/exampleSite/content/blog/bear.md +++ /dev/null @@ -1,25 +0,0 @@ -+++ -title = "Bear" -menu = "main" -date = "2020-01-01" -tags = [ - "blogging", - "no javascript", - "no stylesheets", - "no trackers" -] -+++ - -# Bear - -Website: https://bearblog.dev - -There is a website obesity crisis. Bloated websites are full of scripts, ads, and trackers slowing your readers down every time they try to read your well-crafted content. - -Bear is all you need to build a fantastic and optimized site or blog. It works perfectly on **any** viewing device. All you need to focus on is writing good content. - -Bear makes it simple to publish content online and grow an audience while keeping pages tiny, fast, and **optimized for search engines.** - -Each page is ~5kb. - -Learn more and contribute on [GitHub](https://github.com/HermanMartinus/bearblog). diff --git a/exampleSite/content/blog/hugo.md b/exampleSite/content/blog/hugo.md deleted file mode 100644 index 2245a48..0000000 --- a/exampleSite/content/blog/hugo.md +++ /dev/null @@ -1,31 +0,0 @@ -+++ -title = "Hugo" -menu = "main" -date = "2020-01-02" -tags = [ - "blogging", - "static site generator" -] -+++ - -# Hugo - -Website: https://gohugo.io - -Written in Go, Hugo is an open-source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML, and JSON data file types, Markdown and HTML content files, and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification, and support for Sass SCSS workflows. - -Hugo makes use of a variety of open source projects including: - -* https://github.com/yuin/goldmark -* https://github.com/alecthomas/chroma -* https://github.com/muesli/smartcrop -* https://github.com/spf13/cobra -* https://github.com/spf13/viper - -Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single-page applications, or even a website with thousands of pages. - -Hugo is for people who want to hand-code their own website without worrying about setting up complicated runtimes, dependencies, and databases. - -Websites built with Hugo are swift, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify, and any other hosting provider. - -Learn more and contribute on [GitHub](https://github.com/gohugoio). diff --git a/exampleSite/content/hugo.md b/exampleSite/content/hugo.md new file mode 100644 index 0000000..6f6ce0d --- /dev/null +++ b/exampleSite/content/hugo.md @@ -0,0 +1,26 @@ ++++ +title = "Hugo" +menu = "main" ++++ + +# Hugo + +Website: https://gohugo.io + +Written in Go, Hugo is an open-source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML, and JSON data file types, Markdown and HTML content files, and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification, and support for Sass SCSS workflows. + +Hugo makes use of a variety of open source projects including: + +* https://github.com/yuin/goldmark +* https://github.com/alecthomas/chroma +* https://github.com/muesli/smartcrop +* https://github.com/spf13/cobra +* https://github.com/spf13/viper + +Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single-page applications, or even a website with thousands of pages. + +Hugo is for people who want to hand-code their own website without worrying about setting up complicated runtimes, dependencies, and databases. + +Websites built with Hugo are swift, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify, and any other hosting provider. + +Learn more and contribute on [GitHub](https://github.com/gohugoio). -- cgit v1.2.3