A static site generator written in Go with a YAML configuration file
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Antonio De Lucreziis 38b1017681 Minimal working prototype 2 years ago
cmd/cabret Minimal working prototype 2 years ago
config Minimal working prototype 2 years ago
examples/basic Minimal working prototype 2 years ago
exec Minimal working prototype 2 years ago
operation Minimal working prototype 2 years ago
path Minimal working prototype 2 years ago
util Minimal working prototype 2 years ago
.gitignore initial commit 2 years ago
README.md Minimal working prototype 2 years ago
cabret.go Minimal working prototype 2 years ago
go.mod Minimal working prototype 2 years ago
go.sum Minimal working prototype 2 years ago
walk.go Minimal working prototype 2 years ago

README.md

Cabret

A yaml based static site generator, ideally with the same features as Hugo but with a simpler model.

entryPoints:
  - source: index.html
    pipeline:
      - layout: layouts/base.html
      - target: dist/index.html
  - source: posts/{id}.md
    pipeline:
      - plugin: markdown
      - layout: layouts/base.html
      - target: dist/posts/{id}/index.html

ToDo

Tags

A case of fan-in (get all posts and group by tags) and fan-out (generate all tag pages with back-links to posts)

entryPoints:
  ...
  - source: posts/{id}.md
    pipeline:
      - plugin: frontmatter
      - plugin: group
        metadataKey: tag
        key: tags
        pipeline:
          - layout: layouts/tag.html
          - layout: layouts/base.html
          - target: dist/tags/{tag}/index.html # ...{tag}... is the same as "metadataKey" (?)

Pagination

A case of fan-out with (various data leakages)

entryPoints:
  ...
  - pipeline:
      - plugin: paginate
        items:
          pipeline:
            - source: posts/{id}.md
            - plugin: frontmatter
        pageSize: 10
        metadataKey: page
        pipeline:
          - layout: layouts/list.html