Git Product home page Git Product logo

chringel-hugo-theme's Introduction

chringel - Privacy focused theme for Hugo ๐Ÿ•ต๏ธ

Based on the awesome Hugo Starter Theme with Tailwind CSS. Go check it out! ๐Ÿš€

chringel

This theme was created with privacy in mind. By default, Disqus and Google Analytics are disabled, but you are free to use them, if you want. Instead this theme comes with configuration options for Isso and umami.

Quickstart

For a new site

# Create a new site
hugo new site my-site

# Change into your themes folder
cd my-site/themes

# Clone this theme
git clone https://github.com/chringel21/chringel-hugo-theme.git
  • Don't forget to edit your config.toml to use your new theme
# config.toml
theme = "chringel-hugo-theme"

Create a new post

Included is an archetype to help you get started with creating content. It's a post bundle. Create it with:

hugo new --kind post-bundle post/my-post

Create a new note

If you want to dive into the IndieWeb, chances are you want to create notes. They are like tweets/toots/status updates, or can contain comments, likes and reposts. Take a look at the archetype. I would recommend creating notes like this:

hugo new notes/`date +'%Y/%m/%d/%H%M'`.md

This will create a note in your content folder at content/notes/YYYY/mm/dd/HHMM.md.

Features

  • ๐ŸŒ /๐ŸŒš Automatic dark mode based on device setting
  • ๐Ÿ’ฌ Isso commenting server similar to Disqus (self-hosted)
  • ๐Ÿ“ˆ umami - simple, easy to use, web analytics solution (self-hosted)
  • ๐Ÿฆ SVG (social) icons powered by ionicons, currently Twitter, Github, Mastodon and RSS are available, but more can be downloaded with a simple shell script
  • ๐Ÿง‘โ€๐Ÿ’ป Syntax highlighting with copy function
  • ๐Ÿ”— Deeplinks to headings in a blog post
  • ๐Ÿ“„ Resume from JSON data based on JsonResume schema
  • ๐Ÿ•ธ IndieWeb implementation of microformats2 h-card and h-entry

Full config.toml example

title = "chringel - Privacy focused theme for Hugo"
languageCode = "en-us"
baseurl = "http://example.com/"
theme = "chringel"
themesDir = "../.."

author = "Christian Engel"
copyright = "Copyright ยฉ 2022, Christian Engel, all rights reserved."

pluralizelisttitles = false
paginate = 10
enableEmoji = true

[Params]
    name = "chringel"
    description = "A privacy focused theme for Hugo"

    github_user = "chringel21"
    github_repo = "https://github.com/chringel21/chringel-hugo-theme"
    github_banner = true

    favicon = "favicon.ico"

    # Title to be displayed in header
    headerTitle = 'chringel@dev: ~/$'
    # User image
    titleImage = 'images/index.png'
    # Copyright text displayed in footer
    footerCopyrightText = 'Christian Engel 2022'

# Favicons config
# Get your favicons from https://realfavicongenerator.net/
# Put them in the 'static' folder
[Params.favicons]
  appleTouchIcon = '/apple-touch-icon.png'
  icon32 = '/favicon-32x32.png'
  icon16 = '/favicon-16x16.png'
  manifest = '/site.webmanifest'
  maskIcon = '/safari-pinned-tab.svg'
  msApplicationTileColor = '#5bbad5'
  themeColor = '#ffffff'

# Isso configuration
# https://posativ.org/isso/docs/configuration/client/
[Params.isso]
  enabled = true
  data = "https://comments.exmaple.com/"
  id = "thread-id"
  css = true
  lang = "en"
  replyToSelf = true
  requireAuthor = true
  requireEmail = false
  avatar = true
  avatar-bg = "#f0f0f0"
  jsLocation = "https://comments.example.com/js/embed.min.js"

# Umami configuration
# https://umami.is/docs/install
[Params.umami]
  enabled = true
  websiteId = "1234567-abcd-efgh-0000-abcdefg1234"
  jsLocation = "https://analytics.example.com/umami.js"

# microformat2 h-card configuration
# All params except 'fullName' are optional
[Params.hcard]
  avatar = "/images/index.png"
  fullName = "Christian Engel"
  pronouns = [ "he", "him" ]
  nickname = "chringel"
  showLocation = true
  city = "My Town"
  region = "My State"
  country = "My Country"

[Params.indieweb]
  authorizationEndpoint = "https://indieauth.com/auth"
  tokenEndpoint = "https://tokens.indieauth.com/token"

[Params.webmention]
  webmentionUrl = "https://webmention.io"
  webmentionEndpoint = "/webmention"
  webmentionPingbackEndpoint = "/xmlrcp"

# Social icons to be displayed on the front page
[[menu.social]]
  name = "GitHub"
  url = "https://github.com/chringel21"

[[menu.social]]
  name = "Twitter"
  url = "https://twitter.com/DeEgge"

[[menu.social]]
  name = "RSS"
  url = "http://example.com/index.xml"

# To make purging of CSS classes work in production
[build]
  writeStats = true

# syntax highlight settings
[markup]
  [markup.highlight]
    style = "dracula"

Development

Make sure to install postcss-cli and autoprefixer globally in your environment, as Hugo Pipeโ€™s PostCSS requires it. This is mentioned in the Hugo Docs.

npm install -g postcss-cli
npm install -g autoprefixer

Change into the theme's folder and install the dependencies.

cd themes/chringel
npm install

Make sure to use a minimum Hugo version of v0.69.0 and above.

Set the writeStats option in your Hugo config file, so that purging of CSS classes works in production. See /exampleSite/config.toml as a guideline.

[build]
  writeStats = true

Run the hugo server using the following command:

HUGO_THEME_DEVELOPMENT=true hugo server --disableFastRender --buildDrafts --buildFuture

The theme will pick up the environment variable and use Hugo's PostCSS pipe to build CSS files.

Check out the Tailwind CSS docs.

Building shippable CSS

postcss assets/css/styles.css --config assets/css/postcss.config.js > assets/css/build.css

chringel-hugo-theme's People

Contributors

awan avatar chringel21 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.