Closed kingcons closed 1 year ago
I define :page-ext ""
in my config. Probably that should be set as the initial arg.
My blog is at https://equwal.com
You HTTP server might not like serving these HTML files as HTML. To do that one must modify the defaulte MIME type.
Admittedly you are right that :index-ext
is a kludge.
That being said, hardcoding index.html is also a kludge. Consider I want to use coleslaw to generate a honeypot for a site that used index.htm
, for example.
I like 5am for a test suite because it uses reader macros. If someone doesn't have 5am installed then all that testing code is discarded at runtime.
I have tried running it on Arch Linux and OpenBSD, and I can confirm that this pull request has fixed the routing issue. Thank you for fixing it.
Well, in that case…
Hey folks 👋
Updated my coleslaw checkout last night and noticed that the merge of PR #187 broke the routing layer as described in issue #200. I reviewed the PR and was confused by some of the changes to the
compute-url
function. I can see how it special cased the root index and the first numeric-index but we should lean on the the routing system in the config for this rather than trying to force it intocompute-url
.My PR should support "extensionless" routing (though I would appreciate a check from @equwal as I can neither find his blog nor his config to test with) and corrects the breakage to my own site + other users. The call to
update-symlink
also no longer makes assumptions about the user's routing config.In general, the biggest flaw in Coleslaw presently is the lack of a test suite. I can't allocate time to that currently but have had a lot of fun hacking with mgl-pax and try lately and may look at working on a more stable coleslaw release with them at a later date.
I know I've been away for a while and that I stepped away from the project due to lack of time. That said, please be careful to test changes locally before merging them. At the very least, trying to build a simple site with 2-3 posts and the example config should not produce obviously incorrect results. Or if the PR requires changes to the default config, it should also update the example coleslawrc accordingly.