Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Hugo #28014

merged 23 commits into from Mar 13, 2019

Switch to Hugo #28014

merged 23 commits into from Mar 13, 2019


Copy link

@XhmikosR XhmikosR commented Jan 9, 2019


  • make sure our folder structure is the proper one for what we want to achieve. Also see if we can make folders nesting level smaller, maybe by using permalinks or something. For content and static.
  • Review the new Chroma styles
  • audit the changes by bep or someone familiar with Hugo

TODO (can be sorted out maybe after the merge)

  • can we generate SRI hashes for existent files on the fly? For bootstrap.min.css, bootstrap.min.js, bootstrap.bundle.min.js, popper.js/1.14.7/umd/popper.min.js. This would simplify things as we could remove the release-sri script
  • get image width/height with Hugo when possible (examples images, homepage)
  • maybe use Hugo Extended version for docs' CSS?
  • bep's suggestion:


    {{< partial "" >}}

    The partial above uses the partial func to load, parse and execute templates. This has its limitations and is possibly ineffective.
    I would recommend that you store your callouts (and other content files you want to include) in a so-called headless bundle -- and load them via .GetPage. This way you can use markdown + shortcodes etc.

  • bep's suggestion:

    Ref. {{ block "header" . }} in your single.html template.
    Blocks only make sense inside base template(s) (i.e. baseof.html), which I cannot see. I would highly recommend that you restructure your templates to use them. It removes some repetition.

Fixed issues
  • fix Netlify previews; fixed with the relative URLs
  • make sure all layouts are fine
    • homepage
      • Fix variables in code snippets
    • examples
      • index page
      • individual examples are not being generated at all
    • versions
      • sort versions in reverse
      • fix 4.0 showing up as 4; fixed by using strings in data files
  • fix partial include/icons
  • fix docs sidebar menu; see if we can still use a data file for this
    • fix single menu item (Migrate)
  • placeholder shortcode: backport the latest v4-dev changes
  • Fix bugify
  • Example shortcode
    • remove the placeholder SVG etc
    • Fix nested placeholder like in media object second example; the regex is too overzealous. We might need to split the string like we currently do.
    • remove the extra newline when there's a placeholder image
    • add default lang html for example shortcode; it seems we only pass HTML
    • support hide_markup or nohighlight in example shortcode and adapt content
    • Use false for text and title in the example shortcode instead of " "
  • fix ToC styling
  • whitespace control
  • Streamline the inline shortcodes whitespace
  • make sure the HTML comments we really want to keep are kept
  • Fix the remaining inline HTML content cases
  • Regenerate Chroma/Pygments styles and adapt it
  • Report/Work around the stray p tags issue
  • Figure out/report why isn't rendered as HTML
  • compare the number of generated pages so that we don't have extra/missing ones like /docs/index.html
  • Before the merge:
    • Remove --renderToDisk from docs-serve script
    • Remove any temp commits

Fixes #24475


@XhmikosR XhmikosR added the docs label Jan 9, 2019
@XhmikosR XhmikosR requested review from a team as code owners January 9, 2019 18:01
@XhmikosR XhmikosR added the build label Jan 9, 2019
@XhmikosR XhmikosR force-pushed the v4-dev-xmr-hugo-2 branch 2 times, most recently from 35dd8ec to 97859e0 Compare January 12, 2019 08:02
@XhmikosR XhmikosR mentioned this pull request Jan 15, 2019
@XhmikosR XhmikosR force-pushed the v4-dev-xmr-hugo-2 branch 8 times, most recently from 74bc5ce to 6fbdc80 Compare January 21, 2019 13:04
Copy link
Member Author

If anyone is familiar with Hugo and has some time, I could use some help here.

I really want us to make the switch, we just need some help setting things up.


This comment has been minimized.


This comment has been minimized.

@XhmikosR XhmikosR force-pushed the v4-dev-xmr-hugo-2 branch 8 times, most recently from 5abce52 to 014827e Compare January 25, 2019 16:09
Copy link

@bardiharborow bardiharborow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't vouch for everything here, but seems 95% so let's merge and get on with it. 😅

@XhmikosR XhmikosR merged commit 02e0aa3 into master Mar 13, 2019
v5 automation moved this from Approved to Shipped Mar 13, 2019
@XhmikosR XhmikosR deleted the v4-dev-xmr-hugo-2 branch March 13, 2019 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
No open projects

Successfully merging this pull request may close these issues.

Switch to Hugo
8 participants