Skip to content
This repository has been archived by the owner on Jul 2, 2022. It is now read-only.

Hugo 0.29.0 #30

Merged
merged 3 commits into from
Oct 7, 2017
Merged

Hugo 0.29.0 #30

merged 3 commits into from
Oct 7, 2017

Conversation

markrwilliams
Copy link
Contributor

I tried to build Learn TLA locally following the README and it went badly!

$ hugo
Started building sites ...
WARNING: calling IsSet with unsupported type "invalid" (<nil>) will always return false.

ERROR 2017/10/05 00:02:51 Failed to render "theme/_default/single.html": reflect: call of reflect.Value.Int on string Value

It turns out that the latest version of Hugo, 0.29, breaks a lot of things, including hugo-theme-learn.

This PR attempts to face these vicissitudes of progress head on.

There's a lot of extra stuff hanging around in the hugo-theme-learn directory because it's just a checkout without .git. The Hugo docs imply this is how it's done, though.

This broke overridden partials, because in additional to general code
churn, Hugo 0.22.0 broke Sections:

matcornic/hugo-theme-learn@b2ac829

To aid in future changes, themes/hugo-theme-learn/.commit contains the
git commit's SHA1 of the checkout from
https://github.com/matcornic/hugo-theme-learn.
1) hugo-theme-learn stopped using Hugo's menu system for reasons.  Now
   sections are ordered by their weight, instead of the `menu` setting
   in config.toml.

2) Sections' frontmatter must be in _index.md, not index.md.  Leaving
   it in index.md dissociates the frontmatter from the intended
   section, resulting in duplicate entries and pluralized section
   headers (e.g., "Concurrency" -> "Concurrencies", with a
   "Concurrency" subsection).
- Hugo 0.28 and newer use Chroma, a Go syntax highlight library:

  https://gohugo.io/content-management/syntax-highlighting/

  Setting the site configuration variable `pygmentsUseClassic` to true
  reverts to Pygments highlighting, allowing learntla.com to continue
  to use https://github.com/hwayne/tla-pygments.

- Remove the menu parameter, per
  4101699

- Use hugo-theme-learn's disableSearch and
  disableInlineCopyToClipBoard to disable features previously disabled
  by overriding footer.html.
@hwayne
Copy link
Owner

hwayne commented Oct 6, 2017

Oh man, sorry for accidentally making you do all this D:

Hugo docs seem a bit conflicted on this. I think we're supposed to leave the original theme in and customize with overrides? But I think this makes more sense, so as to avoid breaking theme changes. I'll test it out, confirm everything works, and then we can go forward.

Copy link
Owner

@hwayne hwayne left a comment

Choose a reason for hiding this comment

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

Thank you so much for doing this.

I'll be in the Bay Area next week; can I buy you a beer? I feel like I owe you a beer now.

<script src="{{"js/clipboard.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
<script src="{{"js/perfect-scrollbar.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
<script src="{{"js/perfect-scrollbar.jquery.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
<script src="{{"js/jquery.sticky-kit.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
Copy link
Owner

Choose a reason for hiding this comment

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

After merging this I'm going to go back and remove most of these scripts- I use almost none of them so they're null weight.

<script src="{{"js/hugo-learn.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>

<link href="{{"mermaid/mermaid.css" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" type="text/css" rel="stylesheet" />
<script src="{{"mermaid/mermaid.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
Copy link
Owner

Choose a reason for hiding this comment

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

There's a bunch of places where mermaid diagrams would be pretty handy to have!

@hwayne hwayne merged commit 109c6f8 into hwayne:master Oct 7, 2017
hwayne added a commit that referenced this pull request Oct 7, 2017
We don't use some of these js libraries, so they're just extra website bloat. Leaving in mermaid because I think we can use that.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants