Skip to content

jygastaud/hugo-microtypo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Hugo Microtypo

That project is a try to build a Hugo module by porting Jekyll Microtypo

Requirements

  • Git
  • Hugo > v0.56.0
  • go >= 1.12

Installation

  1. (Optional) If your hugo site is not already a Go module, initialize it with hugo mod init and the URL of your repository at the root of your project:

hugo mod init github.com/username/repository

It should create a go.mod file.

  1. Add the module to your Hugo configuration file:

TOML example:

[module]

  [[module.imports]]
      path="github.com/jygastaud/hugo-microtypo/microtypo"
      disable=false

YAML example:

module:
  imports:
    - path: github.com/jygastaud/hugo-microtypo/microtypo
      disable: false
  1. Import the module
hugo mod get github.com/jygastaud/hugo-microtypo/microtypo

Usage

  • Replace any {{ .Content }} call by {{ partial "content.html" .Content }}
  • Rebuild your site and you're done 🎉

You can also use the content.html partial to replace any variable such as: .Summary...

Some examples:

{{ partial "content.html" .Content }}
{{ partial "content.html" .Summary }}

Options

A new params is available to enable/disable usage of aria-hidden when "Point Median" is used. Default to false.

To change that value, add a new param pointMedian = true inside your config.toml.

Contribute

Note that we can not guarrenty any maintenance of that plugin (yet) but we will do our best.

Be sure that we would more than happy to review any pull request.

If you need to work locally on the module, you can add that line at the end of your go.mod file:

replace github.com/jygastaud/hugo-microtypo/microtypo => /<your-path>/hugo-microtypo/microtypo

About

That project is a try to build a Hugo module by porting [Jekyll Microtypo](https://github.com/borisschapira/jekyll-microtypo)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages