Closed WillSewell closed 3 years ago
I have two examples of this. In both cases I'm putting files in the filesystem rather than interleaving them in Haskell, which is a bit easier since the metadata is provided in a more uniform way.
On the Hakyll website, there are a number of external tutorials that
contain a url
key, e.g.:
they get included in the index here (there's not really any special code here):
https://github.com/jaspervdj/hakyll/blob/master/web/site.hs#L55
And here is the template:
https://github.com/jaspervdj/hakyll/blob/master/web/templates/tutorials.html
On my personal website, my photoblog is simply a mirror of my Tumblr page. They also just contain minimal metadata:
https://github.com/jaspervdj/jaspervdj/blob/master/photos/2020-09-29-wengistrasse-ii.md
And they get included in this template:
https://github.com/jaspervdj/jaspervdj/blob/master/templates/photo.html
Excellent - thanks for the recommendations! I hadn't considered putting the external URL in the post metadata. That's a nicer (more consistent with other posts) way of doing it than defining the links in the Haskell source and merging with existing post links.
I'll close this since this since my question is answered.
One issue I find with the url
tag approach, is the default template for feed-items assumes that the url
is relative to the feedRoot
.
It would be nice if FeedConfiguration
allowed this behaviour to be changed, or if renderFeed
was exported so custom templates could be used. Do you have any preference? I'd be happy to submit a PR.
A workaround for now is to add
root: ''
to the post.
I'm using the following pattern to build the list of links to my blog posts:
I would like to interleave links to blog posts on external sites. To be more concrete, I would like to do something like:
How feasible is it to do something like this?