The Wayback Machine - https://web.archive.org/web/20200928214243/https://github.com/th-h/nanoc-extensions
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

nanoc extensions

Nanoc is a popular static site generator.

I'll add some little extensions for Nanoc here.

filters

abbreviations.rb

Simple Nanoc filter to add <abbr> tags.

After reading a YAML document from /content/_data/abbreviations.yaml, all occurences of each $abbrev are replaced by a <abbr title="$abbrev">$fulltext</abbr> construct.

The filter currently uses a very naive - and time consuming - regexp approach.

The abbreviations dictionay in /content/_data/abbreviations.yaml has to look like this:

---
  abbreviations:
  - abbrev: HTML
    fulltext: HyperText Markup Language

You'll need a (compile and) routing rule to stop the abbreviations.yaml from being rendered and compiled, i.e. like this:

# ignore everything starting with _
compile %r{/_} do
  nil
end
route %r{/_} do
  nil
end

dejure.rb

Nanoc filter implementation of the dejure.org legal integration service.

filter :dejure,
  format: 'weit',
  buzer: 1,
  noheadings: 0,
  target: '_blank',
  class: 'dejure'

Please see the distribution page (in German) or the README file in the _doc/dejure/ directory.

About

extensions for nanoc

Topics

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.