- SSE now works in a way to prevent Firefox spitting errors in console
- Switch to using SSE from websockets - simpler and less deps
- Using hotreload would trim responses to at most 32kb length, fixed now
- Updated all deps, some of them were few years old
- Markdown is now parsed with some attributes
- New template function
abcsort
to sort pages alphabetically
- New template processor
chroma
to highlight code in HTML files
- New template function
absurl
to join urls sanely
- Template function
markdown
broke backward compatibility, fixed now (always wanted more than one argument)
- Built-in support for chroma highlighter (see README)
- Hot reloading reconnects websocket if it closes, so it persists between runs of gostatic
- Hot reloading will now dispatch JS event
hotreload
on window - Mac binary is now universal (x64 and arm64 simultaneously)
- added
trim
template function
Hot reloading now uses morphdom and because of that screen doesn't flicker upon change
- added
datefilename
processor
- added ability to parse Github-like frontmatter, i.e.
---\nvar: content\n---
- all glob matches (like in config) support double stars to descend recursively, like
blog/**/*.md
dir
andbase
functions to manipulate paths in templatesrefind
function to find strings inside strings
cut
now will return empty string if one of regexes did not match- now invalid processor names from config are reported in a better way - their name is included in error message
Enabled unsafe HTML for goldmark - it won't omit raw HTML when rendering
Switch markdown library from blackfriday to goldmark, adding support of Commonmark, and, notably, smartypants-like features.
New template function - some
: returns first non-nil value, intended to use instead of lengthy ifs.
Increase number in version.go
, because it still was 2.17. :)
- new template functions:
count
andreading_time
- hot reloading has an exponential timeout up to a second to reduce flickering
Hot HTML code reload when in dev mode (using gostatic -w/--watch
).
.Has
for pages, .Where
and .WhereNot
for page lists.
exectext
function.
.Reverse
is now available as a method on page lists.
- new template function:
matches
, checks for regexp in a string. - fixed parsing tags in YAML header
- inner templates report their errors better now
- support for BOM (easier to use with files created on Windows)
- CRLF support
- also, gomod - we have pinned versions of dependencies
New processors for people switching from Jekyll: jekyllify
to convert posts to
a familiar path, and yaml
to process headers as YAML (rather than whatever
custom stuff gostatic uses by default).
Now cut
searches for the end
after end of begin
match.
New template function: replacere
.
Two new template functions: even
and odd
.
gostatic -w
now waits 10 ms before doing anything to prevent problems with
emacs-style file changes, when it first creates empty file in place of an old
one and then moves changes over to it.
Two new template functions: starts
and ends
.
Ability to have multiple configurations for a single path (so you can have multiple outputs from one file).
Sort pages with same date alphabetically.
Get exec
template function back.
- Fixed handling \r\n in
config
processor - Now errors of
external
processor are propagated and you'll see them
gostatic is now a library (thanks @zhuharev)! Plus:
exec
function in templatesexceprt
function in templates (thanks @krpors)- gostatic no longer fails on vim's temp files (thanks @krpors)
Make example site (gostatic -i) work with current gostatic.
Fix rename
processor for Windows.
Major version - breaking changes.
- Backward incompatible - template functions
cut
andsplit
now have different order of arguments to better support template pipelining. - Pagination is now supported, see
paginate
processor andpaginator
template function. - Template and config changes are now tracked and will result in full re-render.
- Page now has
.Raw
property, containing unprocessed data (but afterconfig
being consumed). strip_newlines
,replace
,replacen
,contains
,markdown
template functions.- Page list new methods:
.Slice
and.GlobSource
.
More fsnotify stuff.
Updated fsnotify; potentially better watcher behavior.
Ability to specify folders with templates.
"split" function in templates to generate array from string.
Ability to hide pages with hide: true
in page header.
More functions for templates: truncate
and split_html
.
Make errors when processing template at least a bit better.
More strict split in ProcessConfig.
Enable header ids in markdown processing.
Somewhat simplified watch code and it started working.
- Enable footnotes
- Smaller binaries (by skipping debug info)
- Fix directory walking error handling
- Watch source directory instead of destination
- Watch templates for changes
Fixed crash on PageSlice.Prev
when no previous pages exist.
Add PageSlice.Next
and PageSlice.Prev
Ability to print page metadata as json (gostatic --dump src/path/to/url config
).
- Fixed bug with empty bodies
- Ability to have comments in page header (with
#
)
- Fix
PageSlice.Slice
crashes - Fix
cut
to not fail when search returns no results Page.UrlMatches
- Compare tag pages by path (not by title)
- Fix example site to escape entities
- Fix symlink handling
First tagged release, lots of good stuff. :)