Skip to content

Commit

Permalink
feat: Deprecate li shortcode (#247)
Browse files Browse the repository at this point in the history
Close #240

[Content | Bulma: Free, open source, and modern CSS framework based on Flexbox](https://bulma.io/documentation/elements/content/)

```
sed -ie "/{{<\sli\s>}}/d" */**/*.md
git clean -f
sed -ie "/{{<\s\/li\s>}}/d" */**/*.md
git clean -f
```
  • Loading branch information
peaceiris authored Dec 12, 2020
1 parent 76562b4 commit 402c4ec
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 36 deletions.
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.

0 comments on commit 402c4ec

Please sign in to comment.