Skip to content

Commit

Permalink
hugo: Fix anchor links
Browse files Browse the repository at this point in the history
- Add example of anchor link using ref to the example/ref page (this is
  not mandatory to use this way but it can be used like this).
- Add working example to Example - Text on how to use custom-id's.
- Fix smoothscroll of anchor links that start with the path of the
  current page (instead of starting with #).
- Change markdownify to $.Page.RenderString so anchor links get rendered
  correctly (recommended by hugo for more complicated markdown which
  uses the Page context such as anchor links, see highlighted block on
  https://gohugo.io/functions/transform/markdownify). Only tabs still
  uses markdownify because for some reason RenderString does not work
  here because it's a partial inside a shortcode.
- Change links in example/columns to '/' instead of a non-existing
  anchor link.

To test:
Go to /examples and test if all the shortcodes are still working as expected.

Closes cue-lang/cue#2971

Closes #468 as merged as of commit d58c3aaa.

Signed-off-by: Jorinde Reijnierse <[email protected]>
Change-Id: I31682a0bccc87ff44347bfa9612c6d0ad54622c5
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1203530
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Paul Jolly <[email protected]>
  • Loading branch information
JorindeUsMedia authored and jpluscplusm committed Nov 12, 2024
1 parent 90278a9 commit 3416954
Show file tree
Hide file tree
Showing 21 changed files with 81 additions and 42 deletions.
12 changes: 7 additions & 5 deletions content/examples/basic/text/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,24 @@ Also on simple detail page's you should generally not use a Heading 1 in the con
This is because the main title of the page is already a Heading 1.


### Heading - Custom Ids
### Heading - Custom Ids {#custom-id}

Adding custom IDs allows you to link directly to headings. To add a custom heading ID, enclose the custom ID in curly braces on the same line as the heading.
By default Hugo adds the slugified header as the id. For instance: "Heading 2" becomes id 'heading-2'. Providing a custom id allows you to override the automatically generated id, and can be linked to using the custom id as a URL fragment (e.g. `.../url/path/page#custom-id`).

To add a custom heading ID, enclose the custom ID in curly braces on the same line as the heading.

```
### My Great Heading {#custom-id}
```

You can link to headings with custom IDs in the file by creating a standard link with a number sign (#) followed by the custom heading ID. These are commonly referred to as anchor links.
You can link to headings with (custom) IDs in the file by creating a standard link with a hash sign (#) followed by the custom heading ID. These are commonly referred to as anchor links.

{{< columns >}}
```
[Go to Paragraphs](#paragraphs)
[Go to Custom Id Header](#custom-id)
```
{{< columns-separator >}}
[Go to Paragraphs](#paragraphs)
[Go to Custom Id Header](#custom-id)
{{< /columns >}}

---
Expand Down
8 changes: 4 additions & 4 deletions content/examples/shortcodes/columns/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ Note that on small screen (for example mobiles), content will be shown below eac
Lorem ipsum *dolor sit amet*, consectetur adipiscing elit. Phasellus tristique lectus ut bibendum tincidunt. Vestibulum posuere nisl quis bibendum fermentum.
Aenean viverra commodo erat ac porttitor. Suspendisse **a interdum leo**. Etiam volutpat lectus auctor, porttitor urna et, egestas quam. Curabitur sodales,
turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor est eget](#link) erat.
turpis id tristique blandit, purus orci efficitur velit, nec molestie tortor est eget erat.
{{</* columns-separator */>}}
#### Column 2
Lorem ipsum *dolor sit amet*, consectetur adipiscing elit. Phasellus tristique lectus ut bibendum tincidunt. Vestibulum posuere nisl quis bibendum fermentum.
Aenean viverra commodo erat ac porttitor. Suspendisse **a interdum leo**. Etiam volutpat lectus auctor, porttitor urna et, egestas quam. Curabitur sodales,
turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor est eget](#link) erat.
turpis id tristique blandit, purus orci efficitur velit, nec molestie tortor est eget erat.
{{</* /columns */>}}
```

Expand All @@ -31,13 +31,13 @@ turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor es

Lorem ipsum *dolor sit amet*, consectetur adipiscing elit. Phasellus tristique lectus ut bibendum tincidunt. Vestibulum posuere nisl quis bibendum fermentum.
Aenean viverra commodo erat ac porttitor. Suspendisse **a interdum leo**. Etiam volutpat lectus auctor, porttitor urna et, egestas quam. Curabitur sodales,
turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor est eget](#link) erat.
turpis id tristique blandit, purus orci efficitur velit, nec molestie tortor est eget erat.
{{< columns-separator >}}
#### Column 2

Lorem ipsum *dolor sit amet*, consectetur adipiscing elit. Phasellus tristique lectus ut bibendum tincidunt. Vestibulum posuere nisl quis bibendum fermentum.
Aenean viverra commodo erat ac porttitor. Suspendisse **a interdum leo**. Etiam volutpat lectus auctor, porttitor urna et, egestas quam. Curabitur sodales,
turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor est eget](#link) erat.
turpis id tristique blandit, purus orci efficitur velit, nec molestie tortor est eget erat.
{{< /columns >}}

## 3 columns
Expand Down
4 changes: 2 additions & 2 deletions content/examples/shortcodes/info/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ In order to show an informative highlight, you can use `{{</* info */>}}`.
Lorem ipsum *dolor sit amet*, consectetur adipiscing elit. Phasellus tristique lectus ut bibendum tincidunt. Vestibulum `posuere nisl` quis bibendum fermentum.
Aenean viverra commodo erat ac porttitor. Suspendisse **a interdum leo**. Etiam volutpat lectus auctor, porttitor urna et, egestas quam. Curabitur sodales,
turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor est eget](#link) erat.
turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor est eget](#info) erat.
{{</* /info */>}}
```

Expand All @@ -26,7 +26,7 @@ The rendered output looks like this:

Lorem ipsum *dolor sit amet*, consectetur adipiscing elit. Phasellus tristique lectus ut bibendum tincidunt. Vestibulum `posuere nisl` quis bibendum fermentum.
Aenean viverra commodo erat ac porttitor. Suspendisse **a interdum leo**. Etiam volutpat lectus auctor, porttitor urna et, egestas quam. Curabitur sodales,
turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor est eget](#link) erat.
turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor est eget](#info) erat.
{{< /info >}}

## Warning
Expand Down
17 changes: 17 additions & 0 deletions content/examples/shortcodes/ref-relref/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,20 @@ The result will be just like a link. But the difference is that with ref/relref

[Buttons example]({{< relref "buttons/index.md" >}})

Ref can also be used for anchor links:

```
[Anchor links example]({{</* ref "#anchor-header" */>}})
```

[Anchor links example]({{<ref "#anchor-header" >}})

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non felis non justo lobortis tempus ut vitae diam. Quisque ultrices nec ipsum et posuere. Vestibulum non malesuada eros, posuere luctus nulla. In hac habitasse platea dictumst. Nulla dapibus erat odio, ac dignissim quam ullamcorper in. Vivamus vitae metus justo. In hac habitasse platea dictumst. Quisque est nibh, tincidunt sed imperdiet vitae, convallis vel mauris. Nullam porttitor velit vel augue iaculis, eget molestie est ultrices. Sed metus nulla, sodales aliquam sapien at, blandit dignissim arcu.

## Anchor header

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non felis non justo lobortis tempus ut vitae diam. Quisque ultrices nec ipsum et posuere. Vestibulum non malesuada eros, posuere luctus nulla. In hac habitasse platea dictumst. Nulla dapibus erat odio, ac dignissim quam ullamcorper in. Vivamus vitae metus justo. In hac habitasse platea dictumst. Quisque est nibh, tincidunt sed imperdiet vitae, convallis vel mauris. Nullam porttitor velit vel augue iaculis, eget molestie est ultrices. Sed metus nulla, sodales aliquam sapien at, blandit dignissim arcu.

Curabitur quis consectetur lectus. Cras dictum fermentum sapien, sed sollicitudin quam volutpat a. Aenean pellentesque volutpat tincidunt. Duis vestibulum auctor risus at laoreet. Vivamus tincidunt erat et lacus suscipit, nec maximus enim efficitur. Ut auctor quis arcu in iaculis. Ut pharetra rutrum ante non aliquam. Donec nec nisi in mauris lacinia iaculis. Donec cursus mattis orci. Praesent nec ex nec ipsum hendrerit vehicula eu eu mauris. Nulla tincidunt tellus eu lacinia lobortis. Morbi sed orci tellus. Vivamus eget imperdiet magna. Vivamus dictum sit amet sapien quis sodales. Cras nec orci eget quam ornare tempus non sed nibh. Duis sed dolor dolor.

8 changes: 4 additions & 4 deletions content/examples/shortcodes/spotlight/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ In order to spotlight some content, you can use `{{</* spotlight */>}}`.
## Prerequisites
- **A tool to edit text files.** Any text editor you have will be fine. Some popular text editors are VSCode, Vim, Nano, and Emacs; but if you need to use Notepad that will work fine.
- **A command terminal.** `cue` works well using any terminal on Linux and Mac, and on PowerShell or `cmd.exe` in Windows.
- **A tool to edit text files.** Any text editor you have will be fine. Some popular text editors are VSCode, Vim, Nano, and Emacs; but if you need to use Notepad that will work fine.
- **A command terminal.** `cue` works well using any terminal on Linux and Mac, and on PowerShell or `cmd.exe` in Windows.
{{</* /spotlight */>}}
```
Expand All @@ -24,8 +24,8 @@ The rendered output looks like this:

## Prerequisites

- **A tool to edit text files.** Any text editor you have will be fine. Some popular text editors are VSCode, Vim, Nano, and Emacs; but if you need to use Notepad that will work fine.
- **A command terminal.** `cue` works well using any terminal on Linux and Mac, and on PowerShell or `cmd.exe` in Windows.
- **A tool to edit text files.** Any text editor you have will be fine. Some popular text editors are VSCode, Vim, Nano, and Emacs; but if you need to use Notepad that will work fine.
- **A command terminal.** `cue` works well using any terminal on Linux and Mac, and on PowerShell or `cmd.exe` in Windows.

{{< /spotlight >}}

Expand Down
5 changes: 3 additions & 2 deletions hugo/assets/ts/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,11 @@ class App {
scrollToHash(hash);
}

document.querySelectorAll('a[href^="#"]').forEach((element) => {
const currentPath = window.location.pathname;
document.querySelectorAll(`a[href^="#"], a[href^="${currentPath}#"]`).forEach((element) => {
element.addEventListener('click', (e) => {
e.preventDefault();
const target = element.getAttribute('href');
const target = element.getAttribute('href').replace(currentPath, '');
window.history.replaceState(null, '', target);
scrollToHash(target);
});
Expand Down
12 changes: 7 additions & 5 deletions hugo/content/en/examples/basic/text/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,24 @@ Also on simple detail page's you should generally not use a Heading 1 in the con
This is because the main title of the page is already a Heading 1.


### Heading - Custom Ids
### Heading - Custom Ids {#custom-id}

Adding custom IDs allows you to link directly to headings. To add a custom heading ID, enclose the custom ID in curly braces on the same line as the heading.
By default Hugo adds the slugified header as the id. For instance: "Heading 2" becomes id 'heading-2'. Providing a custom id allows you to override the automatically generated id, and can be linked to using the custom id as a URL fragment (e.g. `.../url/path/page#custom-id`).

To add a custom heading ID, enclose the custom ID in curly braces on the same line as the heading.

```
### My Great Heading {#custom-id}
```

You can link to headings with custom IDs in the file by creating a standard link with a number sign (#) followed by the custom heading ID. These are commonly referred to as anchor links.
You can link to headings with (custom) IDs in the file by creating a standard link with a hash sign (#) followed by the custom heading ID. These are commonly referred to as anchor links.

{{< columns >}}
```
[Go to Paragraphs](#paragraphs)
[Go to Custom Id Header](#custom-id)
```
{{< columns-separator >}}
[Go to Paragraphs](#paragraphs)
[Go to Custom Id Header](#custom-id)
{{< /columns >}}

---
Expand Down
8 changes: 4 additions & 4 deletions hugo/content/en/examples/shortcodes/columns/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ Note that on small screen (for example mobiles), content will be shown below eac
Lorem ipsum *dolor sit amet*, consectetur adipiscing elit. Phasellus tristique lectus ut bibendum tincidunt. Vestibulum posuere nisl quis bibendum fermentum.
Aenean viverra commodo erat ac porttitor. Suspendisse **a interdum leo**. Etiam volutpat lectus auctor, porttitor urna et, egestas quam. Curabitur sodales,
turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor est eget](#link) erat.
turpis id tristique blandit, purus orci efficitur velit, nec molestie tortor est eget erat.
{{</* columns-separator */>}}
#### Column 2
Lorem ipsum *dolor sit amet*, consectetur adipiscing elit. Phasellus tristique lectus ut bibendum tincidunt. Vestibulum posuere nisl quis bibendum fermentum.
Aenean viverra commodo erat ac porttitor. Suspendisse **a interdum leo**. Etiam volutpat lectus auctor, porttitor urna et, egestas quam. Curabitur sodales,
turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor est eget](#link) erat.
turpis id tristique blandit, purus orci efficitur velit, nec molestie tortor est eget erat.
{{</* /columns */>}}
```

Expand All @@ -31,13 +31,13 @@ turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor es

Lorem ipsum *dolor sit amet*, consectetur adipiscing elit. Phasellus tristique lectus ut bibendum tincidunt. Vestibulum posuere nisl quis bibendum fermentum.
Aenean viverra commodo erat ac porttitor. Suspendisse **a interdum leo**. Etiam volutpat lectus auctor, porttitor urna et, egestas quam. Curabitur sodales,
turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor est eget](#link) erat.
turpis id tristique blandit, purus orci efficitur velit, nec molestie tortor est eget erat.
{{< columns-separator >}}
#### Column 2

Lorem ipsum *dolor sit amet*, consectetur adipiscing elit. Phasellus tristique lectus ut bibendum tincidunt. Vestibulum posuere nisl quis bibendum fermentum.
Aenean viverra commodo erat ac porttitor. Suspendisse **a interdum leo**. Etiam volutpat lectus auctor, porttitor urna et, egestas quam. Curabitur sodales,
turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor est eget](#link) erat.
turpis id tristique blandit, purus orci efficitur velit, nec molestie tortor est eget erat.
{{< /columns >}}

## 3 columns
Expand Down
4 changes: 2 additions & 2 deletions hugo/content/en/examples/shortcodes/info/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ In order to show an informative highlight, you can use `{{</* info */>}}`.
Lorem ipsum *dolor sit amet*, consectetur adipiscing elit. Phasellus tristique lectus ut bibendum tincidunt. Vestibulum `posuere nisl` quis bibendum fermentum.
Aenean viverra commodo erat ac porttitor. Suspendisse **a interdum leo**. Etiam volutpat lectus auctor, porttitor urna et, egestas quam. Curabitur sodales,
turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor est eget](#link) erat.
turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor est eget](#info) erat.
{{</* /info */>}}
```

Expand All @@ -26,7 +26,7 @@ The rendered output looks like this:

Lorem ipsum *dolor sit amet*, consectetur adipiscing elit. Phasellus tristique lectus ut bibendum tincidunt. Vestibulum `posuere nisl` quis bibendum fermentum.
Aenean viverra commodo erat ac porttitor. Suspendisse **a interdum leo**. Etiam volutpat lectus auctor, porttitor urna et, egestas quam. Curabitur sodales,
turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor est eget](#link) erat.
turpis id tristique blandit, purus orci efficitur velit, nec [molestie tortor est eget](#info) erat.
{{< /info >}}

## Warning
Expand Down
17 changes: 17 additions & 0 deletions hugo/content/en/examples/shortcodes/ref-relref/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,20 @@ The result will be just like a link. But the difference is that with ref/relref

[Buttons example]({{< relref "buttons/index.md" >}})

Ref can also be used for anchor links:

```
[Anchor links example]({{</* ref "#anchor-header" */>}})
```

[Anchor links example]({{<ref "#anchor-header" >}})

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non felis non justo lobortis tempus ut vitae diam. Quisque ultrices nec ipsum et posuere. Vestibulum non malesuada eros, posuere luctus nulla. In hac habitasse platea dictumst. Nulla dapibus erat odio, ac dignissim quam ullamcorper in. Vivamus vitae metus justo. In hac habitasse platea dictumst. Quisque est nibh, tincidunt sed imperdiet vitae, convallis vel mauris. Nullam porttitor velit vel augue iaculis, eget molestie est ultrices. Sed metus nulla, sodales aliquam sapien at, blandit dignissim arcu.

## Anchor header

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non felis non justo lobortis tempus ut vitae diam. Quisque ultrices nec ipsum et posuere. Vestibulum non malesuada eros, posuere luctus nulla. In hac habitasse platea dictumst. Nulla dapibus erat odio, ac dignissim quam ullamcorper in. Vivamus vitae metus justo. In hac habitasse platea dictumst. Quisque est nibh, tincidunt sed imperdiet vitae, convallis vel mauris. Nullam porttitor velit vel augue iaculis, eget molestie est ultrices. Sed metus nulla, sodales aliquam sapien at, blandit dignissim arcu.

Curabitur quis consectetur lectus. Cras dictum fermentum sapien, sed sollicitudin quam volutpat a. Aenean pellentesque volutpat tincidunt. Duis vestibulum auctor risus at laoreet. Vivamus tincidunt erat et lacus suscipit, nec maximus enim efficitur. Ut auctor quis arcu in iaculis. Ut pharetra rutrum ante non aliquam. Donec nec nisi in mauris lacinia iaculis. Donec cursus mattis orci. Praesent nec ex nec ipsum hendrerit vehicula eu eu mauris. Nulla tincidunt tellus eu lacinia lobortis. Morbi sed orci tellus. Vivamus eget imperdiet magna. Vivamus dictum sit amet sapien quis sodales. Cras nec orci eget quam ornare tempus non sed nibh. Duis sed dolor dolor.

8 changes: 4 additions & 4 deletions hugo/content/en/examples/shortcodes/spotlight/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ In order to spotlight some content, you can use `{{</* spotlight */>}}`.
## Prerequisites
- **A tool to edit text files.** Any text editor you have will be fine. Some popular text editors are VSCode, Vim, Nano, and Emacs; but if you need to use Notepad that will work fine.
- **A command terminal.** `cue` works well using any terminal on Linux and Mac, and on PowerShell or `cmd.exe` in Windows.
- **A tool to edit text files.** Any text editor you have will be fine. Some popular text editors are VSCode, Vim, Nano, and Emacs; but if you need to use Notepad that will work fine.
- **A command terminal.** `cue` works well using any terminal on Linux and Mac, and on PowerShell or `cmd.exe` in Windows.
{{</* /spotlight */>}}
```
Expand All @@ -24,8 +24,8 @@ The rendered output looks like this:

## Prerequisites

- **A tool to edit text files.** Any text editor you have will be fine. Some popular text editors are VSCode, Vim, Nano, and Emacs; but if you need to use Notepad that will work fine.
- **A command terminal.** `cue` works well using any terminal on Linux and Mac, and on PowerShell or `cmd.exe` in Windows.
- **A tool to edit text files.** Any text editor you have will be fine. Some popular text editors are VSCode, Vim, Nano, and Emacs; but if you need to use Notepad that will work fine.
- **A command terminal.** `cue` works well using any terminal on Linux and Mac, and on PowerShell or `cmd.exe` in Windows.

{{< /spotlight >}}

Expand Down
2 changes: 1 addition & 1 deletion hugo/layouts/partials/notification-bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="notification-bar is-hidden" data-notification-bar="{{ .type | default "default" }}">
<div class="notification-bar__container">
<div class="notification-bar__content">
{{ .content | markdownify }}
{{ .content | $.Page.RenderString }}
</div>
{{ if .button -}}
<a class="button button--outline notification-bar__cta" href="{{ .button.link }}">
Expand Down
2 changes: 1 addition & 1 deletion hugo/layouts/shortcodes/cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<h3 class="cards__title">{{ $card.title }}</h3>

<div class="cards__content">
{{ $card.content | markdownify }}
{{ $card.content | $.Page.RenderString }}
</div>

{{ if and $card.href $card.label }}
Expand Down
2 changes: 1 addition & 1 deletion hugo/layouts/shortcodes/caution.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<div class="note__content">
{{- if eq .Page.File.Ext "md" -}}
{{- .Inner | markdownify -}}
{{- .Inner | $.Page.RenderString -}}
{{- else -}}
{{- .Inner | htmlUnescape | safeHTML -}}
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion hugo/layouts/shortcodes/columns.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div id="side-{{ .Ordinal }}" class="columns">
<div class="columns__col">
{{- if eq .Page.File.Ext "md" -}}
{{- .Inner | markdownify -}}
{{- .Inner | $.Page.RenderString -}}
{{- else -}}
{{- .Inner | htmlUnescape | safeHTML -}}
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion hugo/layouts/shortcodes/info.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<div class="note__content">
{{- if eq .Page.File.Ext "md" -}}
{{- .Inner | markdownify -}}
{{- .Inner | $.Page.RenderString -}}
{{- else -}}
{{- .Inner | htmlUnescape | safeHTML -}}
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion hugo/layouts/shortcodes/logos__item.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

<div class="dialog__content">
{{ with .Inner }}
{{ . | markdownify }}
{{ . | $.Page.RenderString }}
{{ end }}

{{ if and ($buttonUrl) ($buttonText) }}
Expand Down
2 changes: 1 addition & 1 deletion hugo/layouts/shortcodes/spotlight.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h2 class="spotlight__title">{{ . }}</h2>

<div class="spotlight__content">
{{ if eq .Page.File.Ext "md" -}}
{{ .Inner | markdownify }}
{{ .Inner | $.Page.RenderString }}
{{ else -}}
{{ .Inner | htmlUnescape | safeHTML }}
{{- end }}
Expand Down
Loading

0 comments on commit 3416954

Please sign in to comment.