All Projects → onweru → Hugo Swift Theme

onweru / Hugo Swift Theme

Licence: other
A simple open source theme for publishing with hugo

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Hugo Swift Theme

osprey-delight
Osprey Delight is the free-minded artist's choice for a clutter-free and blazingly fast single-page portfolio.
Stars: ✭ 43 (-49.41%)
Mutual labels:  hugo-theme, gallery, hugo, lazy-loading
Hugo theme pickles
Modern, Simple and beautiful Hugo theme
Stars: ✭ 168 (+97.65%)
Mutual labels:  hugo, hugo-theme, sass
Compose
A Hugo theme for documentation sites. It's inspired by https://forestry.io/docs/welcome/
Stars: ✭ 95 (+11.76%)
Mutual labels:  hugo, hugo-theme, sass
Hugo Theme Console
A minimal, responsive and light theme for Hugo inspired by Linux console.
Stars: ✭ 143 (+68.24%)
Mutual labels:  hugo, hugo-theme, gallery
Hugo Fresh
Hugo Fresh Theme
Stars: ✭ 317 (+272.94%)
Mutual labels:  hugo, hugo-theme, sass
Hugo Blog Jeffprod
A free blog theme for HUGO (https://gohugo.io/), with tags, archives, last posts...
Stars: ✭ 47 (-44.71%)
Mutual labels:  hugo, hugo-theme
Kraiklyn
A Hugo theme for one page documentation
Stars: ✭ 47 (-44.71%)
Mutual labels:  hugo, hugo-theme
Hugo Bearblog
🧸 A Hugo theme based on »Bear Blog«. Free, no-nonsense, super-fast blogging. This theme now includes a dark color scheme to support dark mode 🦉 ⬛️!
Stars: ✭ 86 (+1.18%)
Mutual labels:  hugo, hugo-theme
Simple A
Minimalistic Hugo theme
Stars: ✭ 53 (-37.65%)
Mutual labels:  hugo, hugo-theme
Hugo Theme Terminal
A simple, retro theme for Hugo
Stars: ✭ 832 (+878.82%)
Mutual labels:  hugo, hugo-theme
Phugo
Phugo [ˈfjuːgəʊ] is a gallery/photoblog theme for Hugo.
Stars: ✭ 51 (-40%)
Mutual labels:  hugo, hugo-theme
Hugo Book
Hugo documentation theme as simple as plain book
Stars: ✭ 1,115 (+1211.76%)
Mutual labels:  hugo, hugo-theme
Hugo Theme Bootie Docs
A simple Hugo theme for documentation
Stars: ✭ 45 (-47.06%)
Mutual labels:  hugo, hugo-theme
Hugo Tanka
📝 A minimalist, text-oriented, and performant theme for Hugo/blogdown.
Stars: ✭ 40 (-52.94%)
Mutual labels:  hugo, hugo-theme
Erblog
A Hugo theme created by ertuil.
Stars: ✭ 49 (-42.35%)
Mutual labels:  hugo, hugo-theme
Slick
A fast, minimal, responsive theme for Hugo which honours your privacy
Stars: ✭ 41 (-51.76%)
Mutual labels:  hugo, hugo-theme
Loveit
❤️A clean, elegant but advanced blog theme for Hugo 一个简洁、优雅且高效的 Hugo 主题
Stars: ✭ 1,060 (+1147.06%)
Mutual labels:  hugo, hugo-theme
Hugo Theme Learn
Porting Grav Learn theme to Hugo
Stars: ✭ 1,155 (+1258.82%)
Mutual labels:  hugo, hugo-theme
Hugo Geo
Theme I use for my personal website
Stars: ✭ 65 (-23.53%)
Mutual labels:  hugo, hugo-theme
Hugo Steam Theme
Port of Tommaso Barbato's Ghost theme Steam to Hugo
Stars: ✭ 69 (-18.82%)
Mutual labels:  hugo, hugo-theme

Swift Theme

This theme is designed for blogging purposes. Feel free to extend it for other use cases though.

At its core, it's minimalistic; it doesn't rely on monolithic libraries such e.g jquery, bootstrap. Instead, it uses grid css, flexbox & vanilla js to facilitate the features outlined below:

Hugo Swift Theme

Features

  • Blog
  • Pagination
  • Deeplinks
  • Dark Mode
  • Syntax Highlighting
  • Gallery Support
  • Native lazy loading of images
  • Staticman

Prerequisites

This theme uses sass. Ensure you have the extended version of hugo installed or in your pipeline.

Installation

Add this theme as a Git submodule inside your Hugo site folder:

git submodule add https://github.com/onweru/hugo-swift-theme.git themes/hugo-swift-theme

Configuration

You can configure the site using as follows:

  1. Global Settings & Staticman

    Use the file config.toml.

  2. menu, footer

    See the config.toml file's menu areas.

    Follow the exampleSite/.

  3. Customize Theme colors You can do so easily in the variables sass partial. Use names (e.g red, blue, darkgoldenrod), rgb, rgba, hsla or hex values.

Staticman Comments

By default, Staticman comments are disabled. To enable them, you may refer to the Staticman config Wiki.

Written By Block

How do I include a written by ?

  1. Copy this authors yaml file from the exampleSite into your sites ./data directory.
  [[params.authors]]
    name = "yourName" # if fullName 👇🏻 isn't set, name will be displayed on author card
    fullName = "Your Full Name" # optional. If set, it will display on author card
    bio = "It's time to flex. Write a short or not-so-short summary about yourself."
    photo = "myPhotoFile.jpg"
    url = "https://myURLofChoice.domain"
  1. Specify the name in your content files
...
author: "yourName" # case sensitive. must match the name value in your saved data 
...

What if I want to exclude the written by from some articles?

Don't include an author in your article front matter.

The [[.Params.authors]] interface in the config.toml file helps you:

  1. Write all your author information in one place. This way, you only specify the author name on your content files (posts). The rest of the data i.e photo, url & bio are automatically pulled from the data file.

  2. In certain situations, you may have different people publishing articles on your blog. For example, you could have someone guest blog. Or may be you have a blog co-author.

Deeplinks

For all content published using markdown, deeplinks will be added to the pages so that you can share with precision 😃 Just hover on a heading and the link button will pop. Click it to copy.

Dark Mode

Today most operating systems & browsers support dark mode. Like twitter, which automatically turns into dark mode when the user chooses darkmode, this theme does the same thing.

Dark Mode

Custom Shortcodes

This theme ships with two custom shortcodes (they both use positional parameters):

  1. Video This shortcode can be used to embed a youtube video with custom styling. It takes a solo positional parameter.

    ...
    {{< video "youtubeVideoID" >}}
    ...
    
  2. Picture You want to use darkmode images when darkmode is enabled on a device and a regular image on lightmode? It takes 3 positional parameters

    Store these images in the static/images directory.

    ...
    {{< picture "lightModeImage.png" "darkModeImage.png" "Image alt text" >}}
    ...
    
  3. Gallery Include inline galleries within your articles. These galleries can contain N number of images. It takes 2 positional parameters.

    The 1st parameter is required. It's a comma-separated list (,) of your images' paths.

    The 2nd parameter is optional. It's a double-collon-separated list (::) of your images' alt/description/captions text. It's always a good SEO practice to include alt text for your images.

    ...
    {{< gallery "image1Path.png,image3Path.webp,image4Path.jpg" "A PNG gallery image::A WEBP gallery image::A JPEG gallery image" >}}
    ...
    

    For legibility, you can include a space after the delimiters , & ::

License

The code is available under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].