pencil: Static site generator

[ bsd3, library, web ] [ Propose Tags ]

Pencil is a static site generator. Use Pencil to build a personal website, a blog, and more. Pencil comes pre-loaded with goodies such as Markdown and Sass/Scss support, templating, blogging, and tagging. Designed with the Haskell beginner in mind, but flexible enough to extend for your own needs.


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0, 0.1.1, 0.1.2, 0.1.3, 1.0.0, 1.0.1
Change log CHANGELOG.md
Dependencies base (>=4.8 && <5), data-default (>=0.7 && <1), directory (>=1.2.5.0 && <1.4), edit-distance (>=0.2.2.1 && <0.3), filepath (>=1.4 && <1.5), hashable (>=1.2.6.0 && <1.4), hsass (>=0.8 && <1), mtl (>=2.2 && <3), pandoc (>=2.0 && <3), parsec (>=3.1 && <3.2), semigroups (>=0.18.2 && <0.20), text (>=1.2.2 && <1.3), time (>=1.5.0.1 && <2), unordered-containers (>=0.2.7.2 && <0.3), vector (>=0.12.0 && <0.13), xml (>=1.3.10 && <1.4), yaml (>=0.8.32 && <0.12) [details]
License BSD-3-Clause
Copyright 2018 Elben Shira
Author Elben Shira
Maintainer elben@shira.im
Revised Revision 1 made by elben at 2019-06-14T02:45:39Z
Category Web
Home page https://github.com/elben/pencil
Source repo head: git clone https://github.com/elben/pencil
Uploaded by elben at 2019-05-31T02:51:08Z
Distributions
Downloads 2936 total (13 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2019-05-31 [all 1 reports]

Readme for pencil-1.0.1

[back to package description]

CircleCI

Pencil

Pencil is a static site generator. Use Pencil to build a personal website, a blog, and more. Pencil comes pre-loaded with goodies such as Markdown and Sass/Scss support, templating, blogging, and tagging. Designed with the Haskell beginner in mind, but flexible enough to extend for your own needs.

The easiest way to get started is to read the tutorials at elbenshira.com/pencil and reference the Haddock docs.

The blue-backed notebooks, the two pencils and the pencil sharpener... the marble topped tables, the smell of early morning... and luck were all you needed. — Ernest Hemingway, A Moveable Feast

Examples

Here's an example that shows a personal website with a blog and an RSS feed. Based off the this example.

{-# LANGUAGE OverloadedStrings #-}

module Main where

import Pencil

config :: Config
config =
  updateEnv (insertText "title" "My Awesome Website") defaultConfig

website :: PencilApp ()
website = do
  layout <- load "layout.html"
  index <- load "index.markdown"
  render (layout <|| index)

  loadAndRender "stylesheet.scss"

main :: IO ()
main = run website config

You can check out other examples. The Blog is a good one.

My personal website (http://elbenshira.com) uses Pencil (source here). And so does Pencil's website at elbenshira.com/pencil (source here).

Development

See DEVELOPMENT.md