Change? OMG!

For a while now, I’ve been thinking about moving my blog from Hugo & PaperMod to BSSG.

Both are Static Site Generators, both use Markdown, both are Open Source. But as far as I can tell, the frontmatter of the documents differs between the two systems. This would mean that I’d have to at least check each and every md file by hand before moving it from Hugo to BSSG.

The main content of my blog, i. e. the posts and fixed pages which I wrote by hand, would not be an issue. Currently about 50 files to review and adjust. But I have also moved all my posts from Instagram and Pixelfed over, using a quick’n’dirty Visual Basic script to convert exported HTML into separate files. Hundreds of posts containing one or more images, a few hashtags and maybe a short comment.

I could rewrite that script to accommodate BSSG, but what about the next switch to a new platform a few years down the road?

How do you, fellow bloggers out there, handle this problem?

Should I create all my posts in some kind of basic format and write a translator script to create the final md file with the correct frontmatter? Should I learn Python or Rust and convert the current Hugo style files to BSSG input? And speaking for programming languages: which one should I learn, Python or Rust?

So many questions. :-)

#bssg #blogging #hugo #python #rust

Als Antwort auf zeitverschreib ⁂

Interesting. Currently going down the same route. As for converting the pesky Front Matter, well it seemed right and proper to use bash and sed.

# Delete all 'Comments' lines.
# Join up multiple categories into single Categories line.
# Finally convert Categories to Tags

for file in *.md
do
echo "Processing $file..."
sed --in-place '/^comments: true/d' $file
sed --in-place '/^categories:/ {N;s/\n.*-//;}' $file
sed --in-place 's/^categories:/tags:/' $file
done

Als Antwort auf zeitverschreib ⁂

If you want to learn any just to do that conversion task?
None.

In any other case... I'd bet on both.
#Rust is great for final software where productivity matters as well as quality.
#Python is great for some one liners in the Python shell for quick and dirty solutions, you can write bigger tools as well, but I found #Rust quickly becomes more efficient tool of choice as it's much harder to leave tiny mistakes into the run time.

Als Antwort auf Michał Fita

@Michał Fita I'd like to be able to write small helpers, maybe some day a bigger app. Back in the days, I used Turbo Pascal for whatever I needed to do on MS-DOS. But since then, all I've done is copy&paste code from various sources, keeping my fingers crossed that the final result would at least to the job right at hand.