From 2f06fd78611ffae87377872e602f93577fa07c8c Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Mon, 2 Nov 2020 16:53:37 +0800 Subject: [PATCH] Initial release All of the changes should be documented in the changelog. --- .editorconfig | 14 + .travis.yml | 32 ++ CHANGELOG.adoc | 42 ++ README.adoc | 459 ++++++++++++++++++ assets/css/prism.css | 116 +++++ assets/scss/base.scss | 232 +++++++++ assets/scss/extend.scss | 0 assets/scss/layout.scss | 205 ++++++++ assets/scss/main.scss | 48 ++ assets/templates/heroicon.svg | 9 + assets/templates/simple-icon.svg | 9 + assets/templates/theme.scss | 18 + config.toml | 11 + data/more-contentful/themes/_index.yaml | 18 + docs/social-icons-config-output.png | Bin 0 -> 3347 bytes exampleSite/.gitignore | 15 + exampleSite/README.md | 6 + exampleSite/config.toml | 130 +++++ exampleSite/content/en/about.adoc | 24 + exampleSite/content/en/archives.adoc | 8 + .../asciidoctor-article-template.adoc | 114 +++++ .../asciidoctor-extended-syntax-guide.adoc | 196 ++++++++ .../en/articles/asciidoctor-syntax-guide.adoc | 211 ++++++++ .../content/en/articles/emoji-support.md | 45 ++ .../content/en/articles/hidden-post-test.adoc | 21 + .../en/articles/markdown-syntax-guide.md | 159 ++++++ .../mathjax-support-for-asciidoctor.adoc | 409 ++++++++++++++++ .../articles/mathjax-support-for-markdown.md | 305 ++++++++++++ .../rss-atom-and-json-feed-support.adoc | 76 +++ exampleSite/content/en/recipes/_index.adoc | 17 + .../configurable-list-of-contacts.adoc | 67 +++ .../en/recipes/creating-an-archive-page.adoc | 64 +++ .../en/recipes/customizing-your-head.adoc | 58 +++ .../en/recipes/open-graph-protocol.adoc | 27 ++ .../en/recipes/simple-icons-integration.adoc | 86 ++++ .../content/en/recipes/twitter-cards.adoc | 27 ++ exampleSite/content/tl/about.adoc | 27 ++ exampleSite/content/tl/archives.adoc | 8 + .../content/tl/articles/hidden-post-test.adoc | 18 + .../articles/philippines-national-anthem.adoc | 44 ++ .../rss-atom-and-json-feed-support.adoc | 80 +++ .../data/more-contentful/contacts.toml | 22 + .../data/more-contentful/themes/dracula.yaml | 18 + .../data/more-contentful/themes/nord.yaml | 18 + exampleSite/go.mod | 12 + exampleSite/go.sum | 18 + go.mod | 9 + go.sum | 9 + layouts/_default/baseof.html | 10 + layouts/_default/list.html | 20 + layouts/_default/single.html | 58 +++ layouts/partials/components.html | 81 ++++ layouts/partials/footer.html | 43 ++ layouts/partials/head.html | 60 +++ layouts/partials/header.html | 10 + layouts/partials/pagination.html | 65 +++ theme.toml | 13 + 57 files changed, 3921 insertions(+) create mode 100644 .editorconfig create mode 100644 .travis.yml create mode 100644 CHANGELOG.adoc create mode 100644 README.adoc create mode 100644 assets/css/prism.css create mode 100644 assets/scss/base.scss create mode 100644 assets/scss/extend.scss create mode 100644 assets/scss/layout.scss create mode 100644 assets/scss/main.scss create mode 100644 assets/templates/heroicon.svg create mode 100644 assets/templates/simple-icon.svg create mode 100644 assets/templates/theme.scss create mode 100644 config.toml create mode 100644 data/more-contentful/themes/_index.yaml create mode 100644 docs/social-icons-config-output.png create mode 100644 exampleSite/.gitignore create mode 100644 exampleSite/README.md create mode 100644 exampleSite/config.toml create mode 100644 exampleSite/content/en/about.adoc create mode 100644 exampleSite/content/en/archives.adoc create mode 100644 exampleSite/content/en/articles/asciidoctor-article-template.adoc create mode 100644 exampleSite/content/en/articles/asciidoctor-extended-syntax-guide.adoc create mode 100644 exampleSite/content/en/articles/asciidoctor-syntax-guide.adoc create mode 100644 exampleSite/content/en/articles/emoji-support.md create mode 100644 exampleSite/content/en/articles/hidden-post-test.adoc create mode 100644 exampleSite/content/en/articles/markdown-syntax-guide.md create mode 100644 exampleSite/content/en/articles/mathjax-support-for-asciidoctor.adoc create mode 100644 exampleSite/content/en/articles/mathjax-support-for-markdown.md create mode 100644 exampleSite/content/en/articles/rss-atom-and-json-feed-support.adoc create mode 100644 exampleSite/content/en/recipes/_index.adoc create mode 100644 exampleSite/content/en/recipes/configurable-list-of-contacts.adoc create mode 100644 exampleSite/content/en/recipes/creating-an-archive-page.adoc create mode 100644 exampleSite/content/en/recipes/customizing-your-head.adoc create mode 100644 exampleSite/content/en/recipes/open-graph-protocol.adoc create mode 100644 exampleSite/content/en/recipes/simple-icons-integration.adoc create mode 100644 exampleSite/content/en/recipes/twitter-cards.adoc create mode 100644 exampleSite/content/tl/about.adoc create mode 100644 exampleSite/content/tl/archives.adoc create mode 100644 exampleSite/content/tl/articles/hidden-post-test.adoc create mode 100644 exampleSite/content/tl/articles/philippines-national-anthem.adoc create mode 100644 exampleSite/content/tl/articles/rss-atom-and-json-feed-support.adoc create mode 100755 exampleSite/data/more-contentful/contacts.toml create mode 100644 exampleSite/data/more-contentful/themes/dracula.yaml create mode 100644 exampleSite/data/more-contentful/themes/nord.yaml create mode 100644 exampleSite/go.mod create mode 100644 exampleSite/go.sum create mode 100644 go.mod create mode 100644 go.sum create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/partials/components.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/pagination.html create mode 100644 theme.toml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d7f49d1 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +root = true + +[*] +end_of_line = true +insert_final_newline = true + +[*.{css,scss,sass}] +charset = utf-8 +indent_size = 2 +indent_style = space + +[*.{html,js}] +indent_size = 2 +indent_style = space diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..51c5336 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,32 @@ +dist: bionic +language: generic + +branches: + only: + - master + - demo + +before_install: + - sudo apt-get update + - sudo apt-get install python3 + - sudo apt-get install ruby wget + - wget "https://github.com/gohugoio/hugo/releases/download/v${HUGO_RELEASE}/hugo_extended_${HUGO_RELEASE}_Linux-64bit.deb" + - sudo dpkg -i *.deb + - sudo gem install asciidoctor + +script: + - hugo + +env: + global: + - PRODUCTION=true + - HUGO_RELEASE=0.76.0 + +deploy: + local_dir: "./public/" + provider: pages + skip_cleanup: true + github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable + target_branch: gh-pages + on: + branch: demo diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc new file mode 100644 index 0000000..abdb179 --- /dev/null +++ b/CHANGELOG.adoc @@ -0,0 +1,42 @@ += Changelog +:toc: + +All notable changes to this project will be documented in this file. + +The format is based on https://keepachangelog.com/en/1.0.0/[Keep a Changelog], +and this project adheres to https://semver.org/spec/v2.0.0.html[Semantic Versioning]. + + + + +== [0.1.0] - 2020-11-02 + +The initial release. + + +=== Added + +* Easy custom color schemes with https://github.com/chriskempson/base16[Base16 scheme files]. +* Social media icons with https://github.com/simple-icons/simple-icons[Simple Icons] with the added setting to set whether it should appear in text or as an icon. +* Icons on the content metadata for easier reading with link:https://heroicons.com/[HeroIcons]. + + +=== Changed + +* Port CSS into SCSS now requiring the theme to be used with the extended version. + +* Revamp the appearance of the site. + +* Update the theme button with multiple theme selection. +Since the theme now supports more than two themes, the https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme[`prefers-color-scheme`] (the automagic color scheme solution) will not be used. +footnote:[Workarounds exist to let automatic and manual color scheme selection work together but it is not worth it for now.] + +* The content metadata in the single content format. +** Move to the bottom of the content to make more room for other metadata and to make the content more above-the-fold. +Incidentally, this makes the theme more suitable for personal blogs (which is fine to me). +** With the metadata has been moved, it is now replaced with the same metadata section as seen from the list template. + +* Improve conditional display of the table of content. + +* Change "Back to home" with a link bringing to the top of the page instead. + diff --git a/README.adoc b/README.adoc new file mode 100644 index 0000000..9911494 --- /dev/null +++ b/README.adoc @@ -0,0 +1,459 @@ += hugo-theme-more-contentful +:toc: + + +A https://gohugo.io/hugo-modules/theme-components/#readout[Hugo theme] extending the https://github.com/foo-dogsquared/hugo-theme-contentful[Contentful theme] to be more modern. +It features modern aesthetics and some optimizations making full use of https://gohugo.io/[Hugo]'s feature set. + +Tested primarily with Chromium-based and Firefox-based browsers. + + + + +== Project goals + +* Create a batteries-included theme that is easy to extend and/or modify. +* Focus on the ease of migration of content and data in case the user wants to switch themes. +* https://webaim.org/[Accessibility] for people with disabilities (PWD). +* Make the theme browsable with the following text browsers: +** https://www.brow.sh/[Browsh] +** http://links.twibright.com/[Links] +** https://invisible-island.net/lynx/[Lynx] (the ultimate challenge!) +* Low https://addyosmani.com/blog/performance-budgets/[performance budget] of 30KB or even less, must load under 1 second on a mobile 3G connection, and has a Lighthouse score of >90. +footnote:[It only considered with the default configuration and without non-textual resources such as images and videos.] +* Make the theme functional on `