Skip to content

Conversation

robbymilo
Copy link
Contributor

@robbymilo robbymilo commented Dec 20, 2020

Initial port of the darktable website to hugo. See #113 for background.

I've been able to convert most of the markdown and layout files to a hugo compatible format. There are numerous ways to accomplish things with hugo, so I'd love recommendations if there's a better/easier way to do something here.

Notes:

  • Uses hugo version 0.83.1
  • Uses GitHub actions to deploy a Netlify preview at https://hugo-robbymilo--darktable.netlify.app (can consider using Netlify's open source plan)
  • Adds responsive images for some of the ledes/backgrounds. Note I am not committing most of the rendered thumbnails to git despite hugo's recommendation.
  • I've kept the old theme files and .py scripts for reference, these can probably be removed.

To-do list for parity with the current website:

To test locally:

  • Make sure you have the correct hugo version installed. Run make server and navigate to localhost:1313

Feel free to add to the to-do list, or even better a to-do and solution :)

cc @paperdigits

rename news

rename lede_author

first line

add second line

fix news section

fix blog posts

improve content

move stuff

move stuff

various fixes

improve layouts

layout fixes

update homepage

remove non-working script

fix title

more image fixes

fix some links

improve about section

replace {article.title} with hugo shortcodes

standardize markdown images

move layouts to theme, intial authors migration

update readme

improve list pages

fix fonts

add read more link to list pages

fix navbar

update homepage

add footer

improve templates

make all ledes responsive (not committing resources dir)

make tags works

fix install images

add github action

rename action, only build on non-master

deploy to netlify

rename jobs

fix summaries

add pagination to blog, news

add legacy wordpress comments

add search

update readme

add center css class to support shortcode
@paperdigits
Copy link
Contributor

paperdigits commented Dec 22, 2020

  • Have solutions for all pelican plugins
    • article_metadate - hugo does this by default
    • attach_lede_image - hugo does this by default
    • image_compare - probably need a shortcode
    • image_links - allow @![]() as images which are turned into a scaled down preview image and a link to the original file - not sure we need to do anything but change them to regular images.
    • (Mica)render_math - mathjax - https://5fdf51e92c063cb18114dfa4--darktable.netlify.app/2012/09/edge-aware-image-development/
    • rm_nbsp_title - ?
    • social_media - automatically post to twitter. not sure we need to handle this
    • static_comments - handled in hugo templates
    • summary - provides the "Read more..." - handled in hugo templates
    • tipue_search
  • (Mica) Search has both a link and an input box
  • (Mica) Need RSS links in the footer to match current site
  • Can we name the feeds? We'll need to forward at the web server probably.
  • Install page: section images for distros don't work
  • static comments should check for the existence of the metadata or else don't run the template

@paperdigits
Copy link
Contributor

I've spent about the last 2 hours looking over this with the current site and your port side by side, and damn, this is impressive.

@paperdigits
Copy link
Contributor

hey @robbymilo what's happening? 👯

@robbymilo
Copy link
Contributor Author

@paperdigits hoping to find some time to work on this soon.

@robbymilo
Copy link
Contributor Author

Here is a preview for the image_compare replacement (I think this is the only page with a compare?): https://hugo-robbymilo--darktable.netlify.app/2017/11/local-laplacian-pyramids/

@paperdigits
Copy link
Contributor

@robbymilo I'm stupid, but I pushed a few commits to https://github.com/darktable-org/dtorg/tree/robbymilo-robbymilo/hugo

Is the option enabled in github so I can push commits (as a maintainer) to this PR?

@robbymilo
Copy link
Contributor Author

@paperdigits I added you as a maintainer to https://github.com/robbymilo/dtorg - does that work?

@paperdigits
Copy link
Contributor

paperdigits commented Mar 22, 2021 via email

@paperdigits
Copy link
Contributor

@robbymilo doh! I didn't accept the invitation soon enough... would you be kind enough to send me another?

@robbymilo
Copy link
Contributor Author

@paperdigits sent!

@paperdigits
Copy link
Contributor

paperdigits commented Apr 9, 2021

I think as far as the hugo stuff goes, we're almost done.

Last thing is: handle posts with different slugs - I'd want to use the alias feature from hugo.

Then we just need to look at pages/posts to ensure the markdown rendering looks good. And run a link checker. The last few things we'll need to do with the webserver, like redirecting the RSS feeds.

@patdavid
Copy link
Member

This is impressive work, indeed! I can't thank you enough @robbymilo for all of this work! 😄

I just pulled the site and things look really great locally with Hugo.
I know that @paperdigits wanted to check URL's to make sure all the slugs either matched or take advantage of Hugo redirection for ones that do not. Does anyone have a good command we can use to generate a recursive list of all URLs for the site? something something wget something recursive something?

@robbymilo
Copy link
Contributor Author

@patdavid I think you can range through .Site.AllPages to get every page's .RelPermalink.

@patdavid
Copy link
Member

@robbymilo I was thinking of the existing site first, actually. I wanted to get all releveant URL's from the existing site to make sure there was a corresponding match in your port (and if there wasn't, to include a redirect frontmatter so hugo can redirect any old links to the correct slug/location).

@robbymilo
Copy link
Contributor Author

robbymilo commented May 24, 2021

@patdavid I've added a command (https://github.com/robbymilo/dtorg/blob/robbymilo/hugo/Makefile#L39) that takes all the .html files from the output folder of the current site, and then lists them in https://github.com/robbymilo/dtorg/blob/robbymilo/hugo/output.csv.

Note you need to run the command in the main repo, not my fork.

@paperdigits
Copy link
Contributor

I think this is done. @patdavid can you think of anything else? If you or @robbymilo wants to make a last sanity check, please do!

@paperdigits paperdigits marked this pull request as ready for review June 18, 2021 04:13
@elstoc
Copy link
Contributor

elstoc commented Jun 18, 2021

still needs to incorporate changes from #141 and #142

@patdavid
Copy link
Member

Can we cherry pick those into the hugo branch?

@paperdigits
Copy link
Contributor

@robbymilo I rebased this on master and resolved the conflicts, if you want to take a look at https://github.com/darktable-org/dtorg/tree/hugo

I couldn't figure out how to push that to this PR, and probably better I didn't since it rewrites history.

@elstoc
Copy link
Contributor

elstoc commented Jul 10, 2021

@paperdigits the 3.6 blog post needs {filename} removing from the image links in the Hugo port. Same issue in the 3.4 blog post too. I think perhaps we just used html in the previous ones.

Edit: I've pushed a fix for this to the hugo branch now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants