Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add toggle to disable content tip per post #138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,19 @@ enableComments: false
---
```

### 3.3 Custom CSS and JS
### 3.3 Disable word count and read time on a single post

You can disable the word count and read time tip on pages that don't need it (eg about page) by setting `showTip` to `false`.

For example:
```yaml
---
title: post title
showTip: false
---
```

### 3.4 Custom CSS and JS

You can put your custom css and js files to `static` directory, or use remote css and js files which start with `http://` or `https://`.

Expand All @@ -190,14 +202,14 @@ customJS:
- https://example.com/custom.js # remote js
```

### 3.4 Math Typesetting
### 3.5 Math Typesetting

Mathematical notation is enabled by [KaTeX](https://katex.org/).

- To enable KaTex globally set the parameter `math` to `true` in project’s configuration
- To enable KaTex on a per page basis include the parameter `math` to `true` in content files

### 3.5 Hidden Post Summary in Home Page
### 3.6 Hidden Post Summary in Home Page

To hidden post summary in home page, you could set `hiddenPostSummaryInHomePage` to `true`, default is `false`.

Expand Down
6 changes: 4 additions & 2 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<section id="single">
<h1 class="title">{{ .Title }}</h1>

<div class="tip">
{{ if ne .Params.showTip false }}
<div class="tip">
<time datetime="{{ .PublishDate }}">{{ i18n "publishDateFull" . }}</time>
<span class="split">
·
Expand All @@ -17,7 +18,8 @@ <h1 class="title">{{ .Title }}</h1>
<span>
{{ i18n "minuteRead" . }}
</span>
</div>
</div>
{{ end }}


{{ if or .Site.Params.showToc .Params.showToc }}
Expand Down