hithismani / hugon

A script that simplifies working with archetypes in Hugo! (@gohugoio) Also supports bulk file creation/editing via a single .csv! 🐍
https://pypi.org/project/hugon/
MIT License
17 stars 1 forks source link

Question: Is this package actively maintained. #3

Closed arky closed 1 year ago

arky commented 1 year ago

@hithismani We are planning to use hugon to generate 10k+ markdown pages. Just checking to see if this package is actively maintained. Thanks!

/cc @psubhashish

hithismani commented 1 year ago

Hey!

The project isn't inactive, but isn't being "actively" maintained as I haven't been coming across too many issues.

What is the source for your markdown files? CLI should be fine imo, but csv as a source is better off with a Hugo _prebuild approach.

Try piloting it with a small amount of pages, and let's see what issues come up? If it's something that requires fixing I could provide a timeline for the same if possible. :)

arky commented 1 year ago

Thanks, Glad to hear that. @hithismani

There isn't a fixed timeline.

Been experimenting with small subset of 50 pages. Use a script to downloading data from Internet Archive as CSV and transforming it with pandas. Works great, so far. https://dancing-tulumba-c1f460.netlify.app/

Haven't hit any major issues. But since there is little documentation, looking for answers for such questions:

  1. What is da-image? Is it the cover for each post?
  2. How do you add tags, taxonomy?
  3. Is there a way of skip existing files, right now I am just overwritting any existing images or markdown files? Don't want to overload the internet archive servers by downloading images multiple times.
hithismani commented 1 year ago

The experimental CSV script is just to create simple markdown files. Details about the "da-" prefix key can be found on the primary ReadMe.md of the repo :)

If you're doing something that's slightly complex like adding taxonomy, or a further list of keys and values in the frontmatter of your markdown file, I'd strongly suggest using a _prebuild folder approach to your Hugo site.

Many sites I'm now building at scale, follow this tutorial (https://www.thenewdynamic.com/article/toward-using-a-headless-cms-with-hugo-part-2-building-from-remote-api/) that essentially makes Hugo itself build markdown files in a subfolder, that a parent folder Hugo site can then parse through. If you follow the above tutorial, you can just load your pandas dataframe via a getCSV function instead of getJSON, and it'll work brilliantly for your use case.

It'll be out of the scope of this package, but in that case you won't need this package altogether and you can build even a million markdown files at scale :)

You won't even need to mix Python packages into the build process in that case, it makes things way more seamless in my opinion.

I use this approach on at least 12 sites now, it works way better in almost every use case.

hithismani commented 1 year ago

https://github.com/regisphilibert/monsterspotting-remote.com/blob/main/remote/layouts/partials/build.html

Here is the code you can refer to help adapt to your own use case! Following the tutorial I shared earlier.

arky commented 1 year ago

@hithismani Thanks, I wasn't aware of prebuild feature of Hugo. I'll read the articles and code to see if I could directly fetch from Internet Archive API to create the pages.

hithismani commented 1 year ago

It's not a Hugo feature, it's just a beautiful workaround and I'm certain it'll work for your use case!

Closing this issue for now :)

Cheers!