ReFreezed / LuaWebGen

Generate static websites using Lua.

Home Page:http://refreezed.com/luawebgen/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Content file created with powershell is skipped in building

originalbluesin opened this issue · comments

I am using LuaWebGen for my personal website. Sometime i using Powershell instead of cmd in windows 10 to create content file. And that content file (example.md) is skipped. It appeared in log file as skipped but no detail show why. I'm just newbie at programming that using tool but don't know much about under the hood. It work fine when use cmd normally, take me 3 day to find out.

Also, is there other a way to create normal "content.html" instead of "content/index.html" ? I try to create google website authentication file "web-id-123456789.html" because i don't want to add detail to meta tag. I generated one using config.after but wonder if there is other way.

Sorry for my poor English. Thank you for this wonderful LuaWebGen. I love Lua.

The only pages that are skipped are drafts (unless --drafts is used) and pages whose dates are in the future (or after the date specified by --date). Are you updating page.date on the generated page? If so, does the date include timezone information? If no timezone is specified then UTC is assumed, which might be problematic. (I think I forgot to mention this in the documentation.) I'm really not sure why creating a file in PowerShell would change anything. My test here is working fine (the file was not skipped):

powershell -Command "'Test!' | Out-File -Encoding ASCII -FilePath content/test.md" && webgen build

There's currently no way to prevent pages from becoming index.html files in the output. Generating the file in config.after like you do is probably the best solution for now. (I'm assuming you use outputRaw()?)

Thanks for using LuaWebGen!

I checked the file and found that i edited the date in page.date because the date format is too long. I think i broke the format and it use UTC instead. Tested with powershell again and it work fine.

I does use outputRaw() and config.after in config file to create html.
Thank you very much.