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

Open
wants to merge 14 commits into
base: master
from

Conversation

Projects
4 participants
@XhmikosR
Copy link
Member

XhmikosR commented Jan 9, 2019

TODO:

  • 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
  • Before the merge:
    • Remove --renderToDisk from docs-serve script
    • Remove any temp commits

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:

    Re.

    {{< partial "callout-warning-color-assistive-technologies.md" >}}
    

    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 https://github.com/twbs/bootstrap/pull/28014/files#diff-cadd93f34018d2674cc31bd8da855e07R352 isn't rendered as HTML
  • compare the number of generated pages so that we don't have extra/missing ones like /docs/index.html

Fixes #24475

Preview: https://deploy-preview-28014--twbs-bootstrap.netlify.com/

@XhmikosR XhmikosR added the docs label Jan 9, 2019

@XhmikosR XhmikosR requested review from twbs/css-review as code owners Jan 9, 2019

@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 Jan 10, 2019

@XhmikosR XhmikosR referenced this pull request Jan 15, 2019

Open

Switch to Hugo #24475

@XhmikosR XhmikosR force-pushed the v4-dev-xmr-hugo-2 branch 8 times, most recently from 74bc5ce to 6fbdc80 Jan 15, 2019

@XhmikosR XhmikosR force-pushed the v4-dev-xmr-hugo-2 branch from 6fbdc80 to a7b82b6 Jan 24, 2019

@XhmikosR

This comment has been minimized.

Copy link
Member Author

XhmikosR commented Jan 24, 2019

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.

XhmikosR referenced this pull request Jan 24, 2019

@XhmikosR XhmikosR force-pushed the v4-dev-xmr-hugo-2 branch from 77430ac to 00b56c7 Jan 24, 2019

@BhaveshSGupta

This comment was marked as outdated.

Copy link

BhaveshSGupta commented Jan 25, 2019

@XhmikosR, I have bit of experience in hugo. I can take some time out. How I can help?

@XhmikosR

This comment was marked as outdated.

Copy link
Member Author

XhmikosR commented Jan 25, 2019

@BhaveshSGupta: please see the TODO in the first post :)

I think I'm gonna drop the whole absolute URL. Currently with Jekyll, we use site.baseurl but this variable is an empty string so all the links are basically relative to the server root. So, dropping this seems to make sense and will make things simpler.

@XhmikosR XhmikosR force-pushed the v4-dev-xmr-hugo-2 branch 8 times, most recently from 5abce52 to 014827e Jan 25, 2019

@XhmikosR XhmikosR force-pushed the v4-dev-xmr-hugo-2 branch 3 times, most recently from 947a897 to 74c60eb Feb 13, 2019

@jhabdas

This comment has been minimized.

Copy link

jhabdas commented Feb 14, 2019

@XhmikosR I'm working on a commit to move you over to block layouts as suggested by @bep. I expect to have a commit ready in an hour or two if that's alright by you.

@XhmikosR

This comment has been minimized.

Copy link
Member Author

XhmikosR commented Feb 14, 2019

@jhabdas: thanks! Any improvement is welcome :)

@jhabdas

This comment has been minimized.

Copy link

jhabdas commented Feb 14, 2019

I did a small refactoring to give you a feel for how block layouts work in the contentscontext of your WIP. Basically, what I did here was to create a baseof.html file (your base layout) and then use it for the examples landing page and the pricing example.

jhabdas@b6f9da3

Please look over the pattern as once it clicks you'll understand exactly how to refactor the rest of the examples to use them. If you have any questions just LMK. I'm +8:00 but happy to drop some more patterns on you to help you get this nailed down.

To see base layouts in use outside this project—if it helps conceptually—please feel free to look over my Custom Layouts feature explaining how block templates are supposed to work then take a peek at the code.

Finally, just in case you're using Atom, if your go templates code highlighting isn't working Ctrl+L then typeahead for HTML (Go). (requires language-go syntax)

@XhmikosR

This comment has been minimized.

Copy link
Member Author

XhmikosR commented Feb 14, 2019

Huge thanks! I have some comments, I'll take it to your commit.

@mdo mdo changed the base branch from v4-dev to master Feb 14, 2019

@XhmikosR XhmikosR force-pushed the v4-dev-xmr-hugo-2 branch 6 times, most recently from 008c93c to 5209f22 Feb 19, 2019

@XhmikosR XhmikosR force-pushed the v4-dev-xmr-hugo-2 branch from 5209f22 to d00cf6c Feb 20, 2019

@XhmikosR XhmikosR force-pushed the v4-dev-xmr-hugo-2 branch from d00cf6c to d9e7e3c Feb 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment