Skip to content

Commit

Permalink
feat: add support for Hugo v0.60
Browse files Browse the repository at this point in the history
  • Loading branch information
gcushen committed Dec 7, 2019
1 parent 023a9fe commit 6d97e95
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
4 changes: 4 additions & 0 deletions assets/scss/academic/_root.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ ul.task-list {
list-style: none;
}

ul.task-list li input[type="checkbox"] {
margin-right: 0.5rem;
}

/* Navigation bar text */
.navbar-light {
font-family: $sta-font-nav, sans-serif;
Expand Down
17 changes: 10 additions & 7 deletions exampleSite/config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,16 @@ ignoreFiles = ["\\.ipynb$", ".ipynb_checkpoints$", "\\.Rmd$", "\\.Rmarkdown$", "
mediaType = "application/manifest+json"
rel = "manifest"

# Configure BlackFriday Markdown rendering.
# See: https://gohugo.io/getting-started/configuration/#configure-blackfriday
[blackfriday]
hrefTargetBlank = true # `true` opens external links in a new tab. See https://github.com/gohugoio/hugo/issues/2424
angledQuotes = false
latexDashes = true
extensions = ["backslashLineBreak"]
[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

[imaging]
resampleFilter = "lanczos"
Expand Down
13 changes: 8 additions & 5 deletions exampleSite/content/post/writing-technical-content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Writing technical content in Academic
date: 2019-07-12
math: true
diagram: true
markup: mmark
image:
placement: 3
caption: 'Image credit: [**John Moeses Bauan**](https://unsplash.com/photos/OGZtQF8iC0g)'
Expand Down Expand Up @@ -37,7 +36,7 @@ data.head()

### Math

Academic supports a Markdown extension for $\LaTeX$ math. You can enable this feature by toggling the `math` option in your `config/_default/params.toml` file and adding `markup: mmark` to your page front matter.
Academic supports a Markdown extension for $\LaTeX$ math. You can enable this feature by toggling the `math` option in your `config/_default/params.toml` file.

To render *inline* or *block* math, wrap your LaTeX math with `$$...$$`.

Expand Down Expand Up @@ -186,14 +185,18 @@ renders as

### Asides

Academic supports a Markdown extension for asides, also referred to as *notices* or *hints*. By prefixing a paragraph with `A>`, it will render as an aside. You can enable this feature by adding `markup: mmark` to your page front matter, or alternatively using the [*Alert* shortcode](https://sourcethemes.com/academic/docs/writing-markdown-latex/#alerts).
Academic supports a [shortcode for asides](https://sourcethemes.com/academic/docs/writing-markdown-latex/#alerts), also referred to as *notices*, *hints*, or *alerts*. By wrapping a paragraph in `{{%/* alert note */%}} ... {{%/* /alert */%}}`, it will render as an aside.

```markdown
A> A Markdown aside is useful for displaying notices, hints, or definitions to your readers.
{{%/* alert note */%}}
A Markdown aside is useful for displaying notices, hints, or definitions to your readers.
{{%/* /alert */%}}
```

renders as

A> A Markdown aside is useful for displaying notices, hints, or definitions to your readers.
{{% alert note %}}
A Markdown aside is useful for displaying notices, hints, or definitions to your readers.
{{% /alert %}}

### Did you find this page helpful? Consider sharing it 🙌
2 changes: 1 addition & 1 deletion theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ license = "MIT"
licenselink = "https://github.com/gcushen/hugo-academic/blob/master/LICENSE.md"
description = "The website builder for Hugo. Build *anything* with widgets and deploy with one click! Fully personalize your site with themes, plugins, and language packs."
homepage = "https://sourcethemes.com/academic/"
min_version = "0.58"
min_version = "0.60"
tags = ["widgets",
"resume",
"portfolio",
Expand Down

0 comments on commit 6d97e95

Please sign in to comment.