coleslaw-org / coleslaw

Flexible Lisp Blogware
BSD 2-Clause "Simplified" License
562 stars 82 forks source link

Control of URL generation -- extensions and name-fn #187

Closed equwal closed 2 years ago

equwal commented 4 years ago

Allow for fine-grained control of URL generation including file extensions and name functions.

page extensions

I wanted posts to have no extension (via :page-ext), so I had to modify the code to allow for :page-ext "" to work, and without inserting a dot at the end of my files.

index extensions

Doing the edits to page-ext broke my index symlink, so I had to add :index-ext to the config.

name-fn, calling a function on the title

The default way for coleslaw to generate the post URL is to just use the title, inserting dashes for spaces. I wanted lowercase URLs though, so I made :name-fn in the config to define a function like :name-fn string-downcase for making the URLs. The default is identity, so it won't change your old URLs.

dertuxmalwieder commented 2 years ago

Makes sense to me ..

equwal commented 2 years ago

Thanks for accepting this.

I don't have lisp setup right now (will do later), however, I think there is a bug:

I said:

index extensions

Doing the edits to page-ext broke my index symlink, so I had to add :index-ext to the config.

See the code review.

I suggest undoing the pull this until this is resolved. Thanks.

dertuxmalwieder commented 2 years ago

There was more than enough time to send an updated PR ...

equwal commented 2 years ago

On 22/08/09 02:03PM, Cthulhux wrote:

There was more than enough time to send an updated PR ...

I just found this bug right now, I hadn't come back and checked it since I authored it ages ago.

-- CAEE B377 FC82 BAF9 102C D22F C5CE D003 1AA8 E281 Spenser Truex https://equwal.com