mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 03:00:50 +02:00
Add shortcode for generating table of contents (#258)
This commit is contained in:
parent
97590cb12e
commit
06dc780e6c
3 changed files with 7 additions and 0 deletions
|
@ -28,6 +28,8 @@ Key features:
|
|||
- Simple and refreshing one page design
|
||||
- Easy to customize
|
||||
|
||||
{{% toc %}}
|
||||
|
||||
## Installation
|
||||
|
||||
1. [Install Hugo](https://georgecushen.com/create-your-website-with-hugo/#installing-hugo) and create a new website by typing the following commands in your *Terminal* or *Command Prompt* app:
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
- id: toggle_navigation
|
||||
translation: Toggle navigation
|
||||
|
||||
- id: table_of_contents
|
||||
translation: Table of Contents
|
||||
|
||||
# Buttons
|
||||
|
||||
- id: btn_details
|
||||
|
|
2
layouts/shortcodes/toc.html
Normal file
2
layouts/shortcodes/toc.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
<h2>{{ i18n "table_of_contents" }}</h2>
|
||||
{{ $.Page.TableOfContents }}
|
Loading…
Add table
Add a link
Reference in a new issue