From 72eec2299707881e9e58660467e37b777b51a632 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 17 Apr 2023 19:59:34 +0200 Subject: Initial commit --- .envrc | 1 + config.toml | 33 ++++++++ content/_index.md | 23 ++++++ content/bear.md | 17 ++++ content/blog/_index.md | 3 + content/blog/markdown-syntax.md | 130 ++++++++++++++++++++++++++++++ content/zola.md | 36 +++++++++ flake.lock | 61 ++++++++++++++ flake.nix | 20 +++++ templates/404.html | 8 ++ templates/base.html | 39 +++++++++ templates/favicon.html | 3 + templates/footer.html | 3 + templates/header.html | 4 + templates/index.html | 7 ++ templates/nav.html | 6 ++ templates/page.html | 33 ++++++++ templates/section.html | 38 +++++++++ templates/seo_tags.html | 1 + templates/style.html | 173 ++++++++++++++++++++++++++++++++++++++++ templates/taxonomy_list.html | 14 ++++ templates/taxonomy_single.html | 30 +++++++ theme.toml | 23 ++++++ 23 files changed, 706 insertions(+) create mode 100644 .envrc create mode 100644 config.toml create mode 100644 content/_index.md create mode 100644 content/bear.md create mode 100644 content/blog/_index.md create mode 100644 content/blog/markdown-syntax.md create mode 100644 content/zola.md create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 templates/404.html create mode 100644 templates/base.html create mode 100644 templates/favicon.html create mode 100644 templates/footer.html create mode 100644 templates/header.html create mode 100644 templates/index.html create mode 100644 templates/nav.html create mode 100644 templates/page.html create mode 100644 templates/section.html create mode 100644 templates/seo_tags.html create mode 100644 templates/style.html create mode 100644 templates/taxonomy_list.html create mode 100644 templates/taxonomy_single.html create mode 100644 theme.toml diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..a834b0b --- /dev/null +++ b/config.toml @@ -0,0 +1,33 @@ +title = "Zola ʕ•ᴥ•ʔ Bear Blog" +base_url = "https://codeberg.org/alanpearce/zola-bearblog" +description = "" + +# Whether to automatically compile all Sass files in the sass directory +compile_sass = false + +# Whether to build a search index to be used later on by a JavaScript library +build_search_index = false + +taxonomies = [ + {name = "categories", feed = true}, + {name = "tags", feed = true}, +] + +[markdown] +# Whether to do syntax highlighting +# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola +highlight_code = true + +[extra] + +[[extra.main_menu]] +name = "Bear" +url = "@/bear.md" + +[[extra.main_menu]] +name = "Zola" +url = "@/zola.md" + +[[extra.main_menu]] +name = "Blog" +url = "@/blog/_index.md" diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..7392780 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,23 @@ ++++ ++++ +# A match made in heaven + +There is a website obesity crisis. Bloated websites full of scripts, ads, and trackers are slowing your readers down every time they try to read your well-crafted content. + +Hugo Bear Blog 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. + +[Go to the original bear blog](https://bearblog.dev/). + +--- + +What happens when you combine the worlds' fastest, most lightweight static site generator with a design theme built to provide you with free, no-nonsense, super-fast blogging capabilities? + +**Use this theme, and find out!** + +Made with 💚 by [Alan Pearce](https://alanpearce.eu). + +--- + +Simply publish content online, grow an audience, and keep your pages tiny, fast, and **optimized for search engines**. + +Each page is ~5kb, and you can **host your blog yourself**. diff --git a/content/bear.md b/content/bear.md new file mode 100644 index 0000000..62f5db5 --- /dev/null +++ b/content/bear.md @@ -0,0 +1,17 @@ ++++ +title = "Bear" ++++ + +# Bear + +Website: [https://bearblog.dev](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/content/blog/_index.md b/content/blog/_index.md new file mode 100644 index 0000000..34651ab --- /dev/null +++ b/content/blog/_index.md @@ -0,0 +1,3 @@ ++++ +title = "Blog" ++++ diff --git a/content/blog/markdown-syntax.md b/content/blog/markdown-syntax.md new file mode 100644 index 0000000..509cb4a --- /dev/null +++ b/content/blog/markdown-syntax.md @@ -0,0 +1,130 @@ ++++ +title = "Markdown Syntax Guide" +date = "2020-01-03" +description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements." +taxonomies.tags = [ + "markdown", + "syntax", +] ++++ + +For a quick cheatsheet, check out [https://simplemde.com/markdown-guide](https://simplemde.com/markdown-guide). + +--- + +This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme. + + +## Headings + +The following HTML `
Test
+ + +``` + +#### Code block indented with four spaces + + + + + +Test
+ + + +## List Types + +#### Ordered List + +1. First item +2. Second item +3. Third item + +#### Unordered List + +* List item +* Another item +* And another item + +#### Nested list + +* Fruit + * Apple + * Orange + * Banana +* Dairy + * Milk + * Cheese + +## Other Elements — abbr, sub, sup, kbd, mark + +GIF is a bitmap image format. + +H2O + +Xn + Yn = Zn + +Press CTRL+ALT+Delete to end the session. + +Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. diff --git a/content/zola.md b/content/zola.md new file mode 100644 index 0000000..5458750 --- /dev/null +++ b/content/zola.md @@ -0,0 +1,36 @@ ++++ +title = "Zola" ++++ +## No dependencies + +Zola comes as a single executable with Sass compilation, syntax +highlighting, table of contents and many other features that +traditionally require setting up a dev environment or adding some +JavaScript libraries to your site. + +## Blazing fast + +The average site will be generated in less than a second, including +Sass compilation and syntax highlighting. + +## Scalable + +Zola renders your whole site as static files, making it trivial to +handle any kind of traffic you will throw at it at no cost without +having to worry about managing a server or a database. + +## Easy to use + +From the CLI to the template engine, everything is designed to be +intuitive. Don't take my word for it though, look at the documentation +and see for yourself. + +## Flexible + +Zola gets out of your way so you can focus on your content, be it a +blog, a knowledge base, a landing page or a combination of them. + +## Augmented Markdown + +Zola comes with shortcodes and internal links to make it easier to +write your content. diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..afbf271 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1681693905, + "narHash": "sha256-XdXMvCt+i2ZcmAIPZvu3RUwcdaC9OX7d1WMAJJokzeA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "db34d7561caa508ece0265a56f382c5d3b7a6c1b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..c257b2a --- /dev/null +++ b/flake.nix @@ -0,0 +1,20 @@ +{ + description = "A bear blog theme for Zola"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + git + gnugrep + zola + ]; + }; + }); +} diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..bfb6e35 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block title %}404{% endblock %} + +{% block main %} ++ + + +
+{%- endif %} +{%- endif %} ++ {%- if page.taxonomies %} + {%- for name, taxon in page.taxonomies %} + {{ name | capitalize }}: + {%- for item in taxon %} + #{{ item }} + {%- endfor %} + {%- endfor %} + {%- endif %} +
+{% endblock %} diff --git a/templates/section.html b/templates/section.html new file mode 100644 index 0000000..6801267 --- /dev/null +++ b/templates/section.html @@ -0,0 +1,38 @@ +{% extends "base.html" %} + +{% block main %} +