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

feat: Deprecate li shortcode #247

Merged
merged 1 commit into from
Dec 12, 2020
Merged
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
19 changes: 0 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ Hugo IRIS Theme
- [Shortcodes](#shortcodes)
- [circle](#circle)
- [button](#button)
- [li](#li)
- [mermaid](#mermaid)
- [repo](#repo)
- [github-sponsors-list](#github-sponsors-list)
Expand Down Expand Up @@ -246,24 +245,6 @@ If your logo image is located at `static/images/logo.jpg`.

<img width="500px" src="https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/master/exampleSite/static/images/shortcode_button.jpg" alt="Shortcode button">

### li

```md
{{< li >}}
- Hugo
- Golang
- Static Site Generators
{{< /li >}}

{{< li >}}
1. Hugo
1. Golang
1. Static Site Generators
{{< /li >}}
```

<img width="500px" src="https://raw.githubusercontent.com/peaceiris/hugo-theme-iris/master/exampleSite/static/images/shortcode_li.jpg" alt="Shortcode li">

### mermaid

```md
Expand Down
8 changes: 2 additions & 6 deletions exampleSite/content/en/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,13 @@ View source code on GitHub.

### Keywords

{{< li >}}
- Hugo
- Golang
- Static Site Generators
{{< /li >}}

{{< li >}}
1. Hugo
1. Golang
1. Static Site Generators
{{< /li >}}
2. Golang
3. Static Site Generators



Expand Down
6 changes: 0 additions & 6 deletions exampleSite/content/en/posts/markdown-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,27 +135,21 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou

### Ordered List

{{< li >}}
1. First item
2. Second item
3. Third item
{{< /li >}}

### Unordered List

{{< li >}}
* List item
* Another item
* And another item
{{< /li >}}

### Nested list

{{< li >}}
* Item
1. First Sub-item
2. Second Sub-item
{{< /li >}}



Expand Down
2 changes: 0 additions & 2 deletions exampleSite/content/ja/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ date: 2020-01-25T23:00:00.000Z

### キーワード

{{< li >}}
- Golang, Go 言語
- Static Site Generators
{{< /li >}}



Expand Down
Binary file removed exampleSite/static/images/shortcode_li.jpg
Binary file not shown.
5 changes: 5 additions & 0 deletions layouts/partials/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
{{ $content = $content | replaceRE "<h2 " "</section><section class=\"section\"><h2 class=\"title is-3\" " }}
{{ end }}

{{ $content = $content | replaceRE "<ul>\n<li>" "<div class=\"content\"><ul><li>" }}
{{ $content = $content | replaceRE "</li>\n</ul>" "</li></ul></div>" }}
{{ $content = $content | replaceRE "<ol>\n<li>" "<div class=\"content\"><ol><li>" }}
{{ $content = $content | replaceRE "</li>\n</ol>" "</li></ol></div>" }}

<section class="section">
{{ partial "toc" . }}
{{ $content | safeHTML }}
Expand Down
3 changes: 0 additions & 3 deletions layouts/shortcodes/li.html

This file was deleted.