diff options
author | Asur <asur@asurbernardo.com> | 2020-10-14 21:41:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-14 21:41:56 +0300 |
commit | e042da8453bed0a4244a0c48747b01d70f9239ad (patch) | |
tree | 3b17fa5b78388976da02a8b7c31abcaf5e664d78 | |
parent | 1761f0850221cdf00a579eb777b2144ee5b697ec (diff) | |
parent | 6e8cb4e466fed828a71e03e27b6ed11c1800d0a4 (diff) |
Merge pull request #37 from asurbernardo/feature-update-docs-and-sample-site
Improve docs and sample site
-rw-r--r-- | README.md | 35 | ||||
-rw-r--r-- | exampleSite/config.toml | 14 |
2 files changed, 37 insertions, 12 deletions
@@ -2,27 +2,23 @@ Amperage is a theme for static site generator [GoHugo](https://gohugo.io/). This theme provides the following features: - - Generates AMP pages. + - Generates native AMP pages. - Valid PWA out of the box. - Automatic structured data. - Service worker for asset caching, link prefetching and offline navigation. - - SEO optimized. + - Made with SEO in mind. - Multilanguage and i18n support. - Code highlighting on build time. - Super fast and lightweight. - Minimal and easily overridable styles. - - Basic AMP shortcodes for ease of use. + - Basic AMP shortcodes and markdown render hooks for ease of use. - Header menu, table of contents and related posts. - Uses web safe fonts by default. - Automatic image croping and srcset generation. - Social share buttons and OGP/Twitter card tags. - - Google analytics with gtag. + - Customizable Google Analytics with gtag. - Configurable Adsense shortcode. - - Comment system agnostic. - -Lighthouse v5 theme results: - -![Lighthouse results](https://raw.githubusercontent.com/asurbernardo/amperage/master/images/lighthouse-results.png) + - Comment system agnostic ([Disqus example](https://github.com/asurbernardo/amperage-disqus-example)). ## ❯ Installation @@ -43,7 +39,7 @@ hugo serve ## ❯ Kitchen sink -You can check out all the components of this theme [here](https://asur.dev/en/amperage/theme-kitchen-sink) and a fully functional website using this theme [here](https://github.com/asurbernardo/blog). +You can check out all the components of this theme [here](https://asur.dev/en/amperage/theme-kitchen-sink) and a fully functional website using Amperage [here](https://github.com/asurbernardo/blog) by yours truly. ## ❯ Configuration @@ -56,7 +52,7 @@ theme = "amperage" pygmentsUseClasses = true # Number of posts shown per page -paginate = 2 +paginate = 10 # Language sections [languages] @@ -122,6 +118,23 @@ paginate = 2 publisherLogo = "/logo-amp-article.png" publisherLogoWidth = 600 publisherLogoHeight = 60 + +# Generate json to use as search index +[outputs] + home = [ "HTML", "RSS", "SearchIndex"] + +[outputFormats] + [outputFormats.SearchIndex] + mediaType= "application/json" + baseName= "search" + isPlainText= true + notAlternative= true + +# Enable unsafe mode to be able to use HTML on markdown +[markup] + [markup.goldmark] + [markup.goldmark.renderer] + unsafe = true ``` ## ❯ Customize logo diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 8b12ae6..3303eca 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -80,5 +80,17 @@ paginate = 3 publisherLogoWidth = 600 publisherLogoHeight = 60 +[outputs] + home = [ "HTML", "RSS", "SearchIndex"] + +[outputFormats] + [outputFormats.SearchIndex] + mediaType= "application/json" + baseName= "search" + isPlainText= true + notAlternative= true + [markup] - defaultMarkdownHandler = "blackfriday"
\ No newline at end of file + [markup.goldmark] + [markup.goldmark.renderer] + unsafe = true
\ No newline at end of file |