Version 4.7 (January 2020)

Release Notes tell you what’s new in Academic. As always, we welcome your feedback. You can also file a bug report. Want to update to this version? Refer to the update guide in conjunction with the parameter changes mentioned in the Breaking Changes section below.

See what’s new in Academic!

Welcome to the v4.7 release of Academic. There are a number of exciting updates in this version that we hope you will like, including:

  • Hugo v0.60 support - significantly improved rendering of Markdown (the renderer is now compliant with Markdown standards), math (no need to escape math in the body of content), and table of contents in the Docs/Courses layout
  • Easily create authors with the author template (archetype)
    • Instead of duplicating the authors/admin/_index.md, new authors can now be created with the command hugo new authors/FIRSTNAME-LASTNAME
    • The command creates a boilerplate authors/FIRSTNAME-LASTNAME/_index.md file ready to be filled in for each author
  • Ability to create Class and State diagrams
  • Pages now load even faster by lazy loading figures and gallery images on demand
    • The proportion of image data in the typical payload of a website can be significant. Lazy loading is a solution that lowers initial page payload and load time, without removing content. Non-critical resources are instead loaded at the moment that they are needed.
  • Website icons can be automatically generated from a single high-resolution image

Breaking changes

  • Hugo Extended v0.60.1+ required
  • If using Netlify, edit the Hugo version in netlify.toml to 0.60.1
  • Replace the Blackfriday settings in your config.toml with the new Markup settings:
    [markup]
      defaultMarkdownHandler = "goldmark"
      [markup.goldmark]
        [markup.goldmark.renderer]
          unsafe = true  # Enable user to embed HTML snippets in Markdown content.
      [markup.highlight]
        codeFences = false  # Disable Hugo's code highlighter as it conflicts with Academic's highligher.
      [markup.tableOfContents]
        startLevel = 2
        endLevel = 3
    
  • Remove markup: mmark from the front matter of any pages as its been superseded by the Hugo’s new default Markdown renderer, Goldmark, which now supports math by default (as long as math enabled in config or front matter as per the docs)
  • Replace any asides in the form A> I'm an aside. with the shortcode equivalent {{% alert note %}} I'm an aside. {{% /alert %}}
  • Move static/img/icon-512.png, if it exists, to assets/images/icon.png, creating the new folders if necessary
  • Delete static/img/icon-32.png and static/img/icon-192.png if they exist
  • If using a website logo, such that the logo option is set in params.toml, move the logo image to assets/images/logo.png, creating the new folders if necessary, and remove the logo option from your params.toml as the image is now automatically detected if it’s present

Commenting

If you wish to use a self-hosted Commento instance, rather than the official Commento service, you can now specify the URL of your self-hosted Commento by adding the following settings to the Comments section of your params.toml:

  # Configuration of Commento.
  [comments.commento]
    # If self-hosting Commento, enter its URL here (e.g. "https://commento.?.com"), otherwise leave empty.
    url = ""

Misc

  • Improved workaround for the Hugo GetPage/urlize bug with non-ASCII (unicode) usernames
    • Attempt to enable unicode usernames and corresponding unicode user profile URLs (can set removePathAccents = false in config.toml to test it out)
    • Uses Hugo’s anchorize function rather than urlize for fetching user profiles for users with non-ASCII usernames. Apparently anchorize does not perform URL encoding unlike urlize, so may be better suited for use with GetPage.
  • Fix max font size calculation in Tag Cloud widget (#1497)
  • Refactor cookie consent so that it will use local assets for offline sites
  • Author name now appears in browser tab when visiting an author’s profile page

Language Packs

  • Added Swedish
  • Added Estonian
  • Update Polish

Known issues

Table of Contents shortcode

Hugo v0.60 has a breaking change/bug which breaks the Table of Contents shortcode. There is a workaround documented here. The table of contents that is built into the docs layout is unaffected by this Hugo bug.

Thank you

Last but certainly not least, a big Thank You to all the folks that helped to make Academic even better.

Has Academic helped you? Please consider supporting Academic.

Ask a question