Migrating from rig3 to hugo

I’ve been using rig3 as a static blog generator for years. It’s reasonably featureful and I’ve hacked it to do what I need, but

  1. I’m likely the last user of that code
  2. it’s becoming unbearably slow because it regenerates all pages which themselves contain a time index at the top, causing work that lasts over 60 seconds and an rsync that’s also doing too much work to push to my main server.

Obviously hugo fixes both these problems :wink:

But can it do the following?
See: http://marc.merlins.org/perso/linux/ for an example.

  1. One thing I really like with rig3 is that I write this file:
    http:// marc.merlins.org/Pix/albums/Trips/20130618_France/20130628_Day11_Carcasonne/index.izu
    I locate it inside this picture gallery:
    http:// marc.merlins.org/Pix/?album=Trips/20130618_France/20130628_Day11_Carcasonne
    and it makes this post, with links back to the picture library (had to break the link, I can only post 2, this sucks)

http://
marc.merlins.org/perso/france2013/post_2013-06-28_France-Day-11_-Arles-and-Carcasonne.html
(had to break the link, I can only post 2, this sucks)

With rig3, the rigimg tag runs my own script with a link to the picture as input, my script generates a thumbnail of the right size in the rig3 directory, and rig3 generates a page with a link to this:
http:// marc.merlins.org/blogimg/thumb1024_3753_20130628_Day11_Carcasonne.jpg

with the link pointing to a custom URL I build myself to give this:

http:// marc.merlins.org/perso/gps/gmap/20130618_France.php?lat=43.206735905&lon=2.365729725&name=photo&desc=3753_20130628_Day11_Carcasonne&label=photos&url=%2FPix%2FTrips%2F20130618_France%2F20130628_Day11_Carcasonne%2F3753_20130628_Day11_Carcasonne.html&thumbnail=%2Fblogimg%2Fthumb1024_3753_20130628_Day11_Carcasonne.jpg
(grr, I had to break this URL too for my post to be accepted)

Generally, can I write yaml files in picture directories like
http:// marc.merlins.org/Pix/albums/Trips/20130618_France/20130628_Day11_Carcasonne/
and have hugo automatically pick them up and generate a post there the image links go to the library?

  1. I use categories you see at the top, I hugo can do this, but I have hidden categories like http://
    marc.merlins.org/perso/france2013/ (warning very big page to load). Can hugo do hidden categories?

  2. for a page big like the one above, can hugo generate 3 index pages?
    a) http:// marc.merlins.org/perso/france2013/ (everything)
    b) abbreviated posts with permalinks
    c) links only, like http:// marc.merlins.org/perso/france2013/links.html

  3. I generate my blog twice, once with private posts and all public posts, and another time with public posts only (all posts with a public category end up in the public blog too, and posts from private that link to public posts give a URL that is public). So I have 2 URLs

  1. The hugo themes I looked at all wanted to truncate my posts on the index page. As you can see on my links above, I don’t want my posts truncated on the index page, but I do control how many posts end up on each index page (full index or category index) so that the resulting page isn’t too absurdly long
    Is that possible with Hugo?

  2. For the rest, I use perrmalinks, posts in multiple categories, which hugo supports, and rig3 supports both
    pages cut by month like
    http:// marc.merlins.org/ perso/rc/2014-08.html#My-Best-FPV-Flight-With-My-Cularis
    and permalinks for single posts like
    http:// marc.merlins.org/ perso/rc/post_2014-08-25_My-Best-FPV-Flight-With-My-Cularis.html
    Can I do all this with Hugo?

Thanks :slight_smile:
Marc
(and sorry for all the broken links, I know it’s an attempt at anti spam, but this just made my post a lot less likely to be read and get help on due to the extra hoops I had to add. Not so cool…)

Marc,
Thanks so much for your interest in Hugo. Sorry for the overzealous spam detection. We’ve recently setup this forum and just went with the defaults for most settings.

  1. Today Hugo can’t do this. I’ve been thinking about how best to add media support. I’m in the middle of a rewrite of how files are being handled using more of a delegation approach. Once that is in place adding some support for media files will be easier.

The general way I would think about this would be that each file could either have the metadata in the “front matter” of the file (as is the case with markdown today) or in a metadata file next it it (same name + .yaml for example).

I’d really like the feature where a directory of images can be picked up by Hugo, associated to a post and generate their own gallery. It’s not there yet today though.

  1. Category support for Hugo is quite good. For Hugo they are just another taxonomy. I’m not sure what you mean by hidden categories, but I would think you would be able to accomplish your needs.

  2. Yes. Hugo can generate any content in as many forms as you would need. You would create 3 different content files. Specify their urls. Associate each with a different template that does what you need it to do.

  3. I think you could do this with Hugo, but I’m not quite certain about what you are trying to do. It may require a simple code change to do this (similar to our draft support today).

  4. Totally possible. Hugo is very flexible.

  5. I don’t think Hugo supports this today. It’s actually the markdown processor that doesn’t add the anchor tags. If it did hugo would automatically support this. We’re adding support for asciidoc which may very well already do this.

We would love to have you aboard and would love any contribution you would like to make.

Hi. Thanks for your answer, and sorry for my late reply, I’ve been on vacation.

It sounds like Hugo is close, but indeed being able to write posts with anchor link that include pictures easily would be important to me since it’s a huge timesaver on how I currently write my posts (mostly based around many pictures).
So, instead of being able to write
[rigimg:1024:103*]
[rigimg:1024:104*]

  1. Would I have to write tags that contain the full directory name of every picture I’m trying to include?
  2. f I use one directory per post, could I have each directory be a symlink to he right place in my picture gallery where instead of index.izu I’d have an index.md and hugo would pick that up?
  3. Then if I put image tags relative to the current directory, would they work?
  4. Since my pictures in the library are high res and I’d want to display them in 1024 size or so, would hugo allow me to refer to the pictures and then it would call a script to resize them, put them in a spool dir and accept a URL back to the auto generated resized picture to include in the final HTML?

Being able to do #4 in some way would be the most important thing for me before I could switch over so that I don’t lose on my current convenient workflow.

Thanks,
Marc

I’ve pushed a major change to the way Hugo handles files. That change hasn’t added this functionality, but it did make it possible to add this in the future.

Thanks. I appreciate it. I’ll stay tuned.
If things get closer even, and you somehow remember, you can ping me at marc at merlins.org or update this thread.
Thanks, Marc