Ask HN: What is setup for your static blog generator?
61–70 of 98 posts
Re: Ask HN: What is setup for your static blog generator?
#62You do realize that Jekyll themes are basically just finished projects people use because they can't believe bothered to create their own site, right?
Re: Ask HN: What is setup for your static blog generator?
#63Re: Ask HN: What is setup for your static blog generator?
#64Re: Ask HN: What is setup for your static blog generator?
#65You write your site in react, which is compiled into HTML at build time. After the user fetches the HTML, gatsby prefetches all the resources that might be needed later, so the site feels incredibly fast when navigating.
Re: Ask HN: What is setup for your static blog generator?
#66Re: Ask HN: What is setup for your static blog generator?
#67$ make post
It works just fine.
Re: Ask HN: What is setup for your static blog generator?
#68I am using pandocomatic¹ to generate my website. It uses pandoc² to convert all kinds of input files to HTML output and pandocomatic is controlling that conversion. Applying it to a directory it converts, copies, or skip everything recursively given a flexible templating system. In the end, it gives me total control over the output and I have started using it for all my websites. ¹ Manual: https://heerdebeer.org/Soft…
The thing I've never figured out with my Pandoc-generated static sites is how to generate RSS feeds from Markdown frontmatter metadata.
For your specific issue, and this is a general pandoc solution, filters with side effects could work. For example, you can write a filter that would extract and inspect the metadata and writes it to to an RSS XML file.
In Paru¹, the Ruby wrapper and interface to pandoc, a very naive solution could look like:
#!/usr/bin/env ruby
require "paru/filter"
require "rss"
RSS_FILE = "my-rss-file.rss"
title = "No title"
date = Time.now.to_s
# Collect metadata information while filtering a document with pandoc
Paru::Filter.run do
title = metadata["title"] if metadata.has_key? "title"
date = metadata["date"] if metadata.has_key? "date"
end
# Create new Atom item
new = RSS::Maker.make("atom") do |maker|
maker.channel.author = maker.channel.about = maker.channel.title = ""
maker.channel.updated = Time.now.to_s
maker.items.new_item do |item|
item.title = title
item.updated = date
item.link = "Some link"
end
end
# Add new item to existing Atom RSS feed
rss = RSS::Parser.parse(File.read(RSS_FILE), false)
rss.items.concat new.items
File.write(RSS_FILE, rss)
(My apologies for the bad code, this is my first attempt at working with RSS/Atom)¹ https://heerdebeer.org/Software/markdown/paru/#writing-and-u...
Re: Ask HN: What is setup for your static blog generator?
#69Re: Ask HN: What is setup for your static blog generator?
#70Hugo plus forestry.io for anything that needs to be edited by non developers. Publii for a quick and simple blog only.