Skip to content

First thoughts on hugo migration: url param, blog, yaml config #30

@josenino95

Description

@josenino95

I built locally the website version on the hugo-migration branch.

From the user perspective, everything in the website looks good and works. I tested a lot of links, and can't report any error.

Then I looked at the repo content and how it changed after the hugo migration. Here are my impressions on what we could look more closely before transitioning:

  1. I see that content files have a url parameter added. After tinkering with it, I think it should be removed in all pages.

    • I think I understand its purpose is to create a permalink when used in the homepage, but that's unnecessary as links are generated based on the hugo configuration, for example for workshops its workshop = '/workshop/:year/:month/:day/:slug'
    • It can get confusing and creating multiple pages with the same content if the date is changed
    • Hmmm, after looking at it more, it seems that without url the page url doesn't end in .html like it used to but in /, which would break backward compatibility. Now I think we should keep it. Or is there a way to say in the config file that generated pages should end in .html and not in /?
  2. To match the yaml style of the md files, the hugo config file could also be YAML. It would only be needed to replace the current hugo.toml at root by hugo.yaml with this:

    baseurl: 'https://ucsbcarpentry.github.io/'
    languagecode: en-us
    title: UCSB Library Software Carpentry Workshops
    
    # Equivalent to Jekyll's future: true - publish posts with future dates
    buildfuture: true
    
    # Disable features we don't need
    disablekinds:
      - RSS
      - sitemap
      - taxonomy
      - term
    
    # URL structure to match Jekyll's category-based permalinks
    permalinks:
      page:
        meeting: '/meeting/:year/:month/:day/:slug'
        posts: '/posts/:year/:month/:slug'
        workshop: '/workshop/:year/:month/:day/:slug'
    
    # Allow raw HTML in markdown (needed for inline HTML in content)
    markup:
      goldmark:
        renderer:
          unsafe: true
    
  3. As part of the hugo transition, we could drop the blog posts sections and leave it for later as group project work.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions