Releases: ReFreezed/LuaWebGen
Releases · ReFreezed/LuaWebGen
Version 1.5
Changes
- Added new Markdown parser (for GitHub Flavored Markdown). Markdown can now contain tables and some other new things.
- Added data parser for plain text files (
*.txt
). (The string contents are just returned as-is.) - markdown is now a module instead of a function.
- toml and json are now aliases for their
.parse()
functions. - XML module: Added functions:
xml.decodeEntities()
- XML module: Added settings:
xml.htmlAllowNoAttributeValue
,xml.htmlScrambleEmailAddresses
Version 1.4
LuaWebGen has a new website! Documentation has moved here.
Changes
- Added syntax for heredoc strings.
- Added functions:
percent()
,urlRaw()
. - Added options:
--baseurloverride
,--meta
,--fullpaths
,--nogc
. - Added better example sites.
- Better support for when baseUrl is pointing to a subdirectory. (
url()
,{{url}}
and other related code now fixes relative paths.) - include() can now take take extra arguments for the target layout to receive.
- A warning is printed when page.date hasn't been updated for a page (except for index and special pages).
- Much faster getImageDimensions() for most images.
- Fixed
"#"
in redirection targets getting messed up and messing other stuff up. - Fixed config.rewriteOutputPath() sometimes having the wrong context.
- Fixed a couple of error messages missing some information.
Version 1.3.1
Changes
- Fixed non-page templates not getting processed before pages.
- Added minimal example site.
- Printing more verbose info.
Version 1.3
Changes
- Added JSON as a supported data format.
- Added
"xml"
as a new template file type (for e.g. RSS feeds and sitemaps). - Added commands new feed and new sitemap.
- Added site.description.
- Added page.description and page.dateModified.
- Added global utf8 module.
- Added global scripts object (similar to data).
- Added functions:
summarize()
,getGeneratedPages()
,echoSmart()
,isValueHtml()
,clampArray()
,gmatchAndBetween()
,json.parse()
,toml.parse()
. - Added --date option for specifying the date to build for.
- subpages() can now take a path prefix as an argument.
- Trying to access page.content too early or in an invalid situation will now raise an error.
- Improved some error messages.
- Fixed subpages() including pages in sibling folders whose name begins with the same name (e.g.
/blog/index.md
included pages under/blogosphere/
). - XML module: All functions now work both on the library object and as methods on elements.
- XML module: Added functions:
xml.contentsToXml()
,xml.contentsToHtml()
,xml.getHtmlText()
. - XML module: xml.walk() now supports traversal actions by returning a value from the callback.
Version 1.2
Changes
- Added config.dataTextParsers and config.dataBinaryParsers for defining custom data file parsers.
- Added getDataTextParsers() and getDataBinaryParsers().
- Added new XML/HTML parsing module to replace the now-removed Penlight+LuaExpat dependency. (The Penlight API still works.)
- Fixed --autobuild stopping the program if there was an error during the build.
- The scripts folder can new have subfolders (just like the data folder).
- Fixed the context being wrong sometimes.
- All errors now (at least) log the traceback.
- Improved some parsing error messages.
- Rewrote/simplified the internal error handling system.
- Apache/htaccess: Error documents pointing to files are validated at the end of builds.
Version 1.1
Changes
- Added variant of generateFromTemplate() that takes a page initializer callback function.
- Added printObject().
- Line endings in read text files are normalized.
- Better XML parsing in Windows version. (CDATA sections now work.) (Universal version users should install LuaExpat.)
- Improved parsing of
{{url}}
blocks. - Fixed Markdown parsing issue for links using angle brackets:
[text](<url>)
- Removed usage of the
<base>
tag from new sites and pages.
Version 1.0
No more beta - it's time for version 1.0!
Changes
Code:
- Whitespace around code blocks can be trimmed away with
{{*
and*}}
. - Code block parsing is a lot more robust (e.g.
{{fori {8,4,11}}}
now works). - Code blocks like
{{--foo}}
are no longer valid as}}
is now part of the Lua comment. - Added
{{for < n}}
and{{fori < arr}}
for iterating backwards. - Removed
{{for -n}}
(which used to iterate backwards). - Fixed
{{some-url-here}}
not working with absolute URLs.
API:
- Added config.redirectionLayout for customizing redirection pages.
- Added config.ignorePaths.
- Added getOutputtedFiles().
- generateFromTemplate() can now take page parameters as an argument. (This reduces the need for formatTemplate().)
- Pages can use no layout by setting page.layout to an empty string.
- The check for whether
{{expression}}
results in HTML or text is now stricter (i.e. resulting in text more often). - config.ignoreFiles and config.ignoreFolders no longer match things in the data folder.
- Removed isAny() variant
isAny(valueToCompare,arrayOfValues)
. Calls need to be changed intoisAny(valueToCompare,unpack(arrayOfValues))
. - Redirection functionality is more robust.
- Updated generated HTML for redirection pages.
- Renamed
_WEBGEN_VERSION
toWEBGEN_VERSION
. - Fixed simplified
for
loop only accepting numerals. It now accepts any value expression. - Fixed accessing valid globals in the main chunk in config.lua resulting in context error.
- Fixed page properties being writable in layouts.
- Fixed line numbers being wrong in some error messages.
- Fixed possibility for internally generated Lua code to break because of function name shadowing.
- Smaller bug fixes.
Version 0.20
This is the first proper release!