Skip to content
A simple open source theme for publishing with hugo
Branch: master
Clone or download
onweru design edits
~ fix issue #12
~ extra archives items will now not be centered
~ change button design
~ alter form input fields' design
Latest commit d953e3a Jul 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets design edits Jul 14, 2019
exampleSite remove redundant file Jul 7, 2019
images move file Jun 20, 2019
layouts design edits Jul 14, 2019
static move file Jun 20, 2019
.gitignore ignore all public directories Jul 7, 2019
LICENSE Add support for reCAPTCHA v2 Jul 6, 2019
README.md fix typo Jul 10, 2019
theme.toml add deeplinks to theme features Jun 3, 2019

README.md

Swift Theme

This theme is designed for blogging purposes. That said, it's extendable for other use cases.

Hugo Swift Theme

Features

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

Theme hugo sass and hugo-extended version.

Configuration

You can configure the site using as follows:

  1. General Information and Staticman config

    Use the file config.toml.

  2. menu, footer

    See the data files inside the data/ directory.

Follow the exampleSite/.

This theme is designed to work with data files. Feel free to extend/alter as you would like.

Staticman Comments

By default, Staticman comments are disabled. If you would like to enable them,

  1. Invite Staticman to your repo to collaborate.

    • GitHub: View the issue eduardoboucas/staticman#243 for procedures to set up Staticman v3.
    • GitLab: Add the GitLab user associated with your Staticman API endpoint (e.g. @staticmanlab) as a "developer" for your project by going to Settings → Members → Invite member.
  2. Uncomment the [Params.staticman] section and input the parameters inside config.toml like so

    [Params.staticman]
      endpoint = "https://https://api.staticman.net"
      gitProvider = "github"
      username = "your-username"
      repository = "hugo-swift-theme"
      branch = "master"

    In case of empty endpoint, it will fallback to the official production instance.

  3. Proceed to setup staticman.yml. Note that this YML file has to be at the root of your Git repository. See the exampleSite/ and the Staticman docs for detailed information of each parameter used in this YML file.

    The parameter moderation is for comment moderation, and it defaults to false. If it is switched to true, then Staticman will create a pull/merge request instead of directly committing against the branch.

    If you are working on GitLab and you have set moderation: false, depending on your branch, you might need the following steps.

    • protected branch (e.g. master): Go to Settings → Repository → Protected Branches and permit the GitLab bot to push against that branch.
    • unprotected branch (GitHub's default): no measures needed

Optional: It is suggested to enable reCAPTCHA to avoid massive spam comments. You may refer to _config.yml for detailed instructions.

ℹ️ This Binary Mist article could also be quite helpful :)

ℹ️ By default, this theme uses the official production instance at v3 instead of v2 due to a requests' quota issue reported in issue eduardoboucas/staticman#222.

⚠️ Since Staticman is an evolving project, things might work differently than they do at the moment of this writing.

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.

License

The code is available under the MIT license.

You can’t perform that action at this time.