Changelog for pencil-1.0.1
CHANGELOG
All notable changes to this project will be documented in this file.
Unreleased
1.0.1
Tests were failing from the sdist distribution due to missing files in
extra-source-files
. Add them.
1.0.0
This is a milestone release! Version 1.0.0. Several breaking changes, but if you read through the changes below, you should find updating your code to be pretty easy. Please email me if you are having problems!
Added
- Added GHC 8.4 and 8.6 support.
- Added
(<<|)
andcoll
to add collection values into structrues. - Added
useFilePath
,escapeXml
,rename
,to
,move
to manipulate loadedPage
s. - Added
loadAndRender
convenience method. Supports individual files and directories. You'll want to use this one to move over static assets quickly and easily:loadAndRender "images/"
. - Added
toTextRss
andrfc822DateFormat
to render content ready for an RSS template. See the Blog example for details.
Changed
- All of the
Pencil.Blog
functions are now re-exported inPencil
. So you only need toimport Pencil
now. load
now automatically figures out the desired final FilePath, so it doesn't take a(FilePath -> FilePath)
as the first argument anymore. You can change your code fromload toHtml "foo.markdown"
toload "foo.markdown"
, for the most part. Useload'
to manually specify the FilePath transform. See examples in the Hackage docs forload'
,to
,move
andrename
.loadResources
, likeload
, no longers takes a file path transformer. Useto
,move
orrename
to change the file path. But really, you probably can useloadDir
orloadDir'
orloadAndRender
instead ofloadResources.
- Renamed
structure
tostruct
. It's shorter. passthrough
now works with directories too.insertPages
return type changed fromEnv
toPencilApp Env
. We now evaluate the given pages (e.g. replace variables) before inserting into env. So you'll need to change fromlet env' = insertPages "posts" posts env
toenv <- insertPages "posts" posts env
.- Renamed
updateEnvVal
toadjust
. - Renamed
insertEnv
toinsert
. - Renamed
injectTagsEnv
toinjectTags
. - Renamed
arrayContainsString
toarrayContainsText
. - Changed how structures work internally to allow collection values into structures.
- Examples now match the tutorials. This is the start of merging the tutorials into the pencil repo itself, instead of living somewhere else.
- Two new errors:
CollectionNotLastInStructure
andCollectionFirstInStructure
to handle collection positions in structures.
Fixed
- Specify example test files in the pencil.cabal file, so that pencil tests run properly.
Removed
renderCss
. UseloadAndRender
instead. As in:loadAndRender "style.scss"
- Removed
VarNotInEnv
error type, since Pencil no longer throws that.
0.1.3
Changed
- Updated dependencies. Should be able to use with recent versions of Stack LTS releases and Nix channels.
- Pandoc updated to 2.5 from 1.x. Source code renders using
<a>
tags now, so you may have to change your CSS. If you want CSS to target only<a href>
tags, usea[href] { ... }
.
0.1.2
Added
- Escape template directives using
$${example}
. This will be rendered literally as${example}
.
0.1.1
Added
- Blog example.
- Minor method changes.
Changed
- Bounds changed for ghc 8.0.2 and 8.2.2 support.
- Improved documentation.
0.1.0
Added
- First release.
0.0.0
Added
Changed
Fixed
Removed
Deprecated
Security
The format is based on Keep a Changelog.