mirror of
https://git.adityakumar.xyz/hugo-theme-even.git
synced 2024-11-09 14:59:45 +00:00
docs(exampleSite): update for chroma
This commit is contained in:
parent
77101032aa
commit
d3a1ab071c
5 changed files with 71 additions and 3 deletions
|
@ -11,6 +11,8 @@ weight: 10
|
||||||
|
|
||||||
contentCopyright: '<a href="https://laozhu.me/post/hugo-nuo-post-preview/" rel="noopener" target="_blank">See origin</a>'
|
contentCopyright: '<a href="https://laozhu.me/post/hugo-nuo-post-preview/" rel="noopener" target="_blank">See origin</a>'
|
||||||
|
|
||||||
|
mathjax: true
|
||||||
|
|
||||||
---
|
---
|
||||||
> Copy from [《Hugo 主题 Nuo 文章样式预览》](https://laozhu.me/post/hugo-nuo-post-preview/)
|
> Copy from [《Hugo 主题 Nuo 文章样式预览》](https://laozhu.me/post/hugo-nuo-post-preview/)
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ Configure for all home and regular pages:
|
||||||
|
|
||||||
Configure for a single post in the front matter (**Params in front matter have higher precedence**):
|
Configure for a single post in the front matter (**Params in front matter have higher precedence**):
|
||||||
|
|
||||||
```yml
|
```yaml
|
||||||
flowchartDiagrams:
|
flowchartDiagrams:
|
||||||
enable: true
|
enable: true
|
||||||
options: "{
|
options: "{
|
||||||
|
|
|
@ -38,7 +38,7 @@ Configure for all home and regular pages:
|
||||||
|
|
||||||
Configure for a single post in the front matter (**Params in front matter have higher precedence**):
|
Configure for a single post in the front matter (**Params in front matter have higher precedence**):
|
||||||
|
|
||||||
```yml
|
```yaml
|
||||||
sequenceDiagrams:
|
sequenceDiagrams:
|
||||||
enable: true
|
enable: true
|
||||||
options: "{theme: 'hand'}"
|
options: "{theme: 'hand'}"
|
||||||
|
|
|
@ -10,7 +10,7 @@ categories: ["shortcodes"]
|
||||||
|
|
||||||
# center, right, left
|
# center, right, left
|
||||||
|
|
||||||
```
|
```markdown
|
||||||
## default
|
## default
|
||||||
![img](/path/to/img.gif "img")
|
![img](/path/to/img.gif "img")
|
||||||
|
|
||||||
|
|
|
@ -98,3 +98,69 @@ object HelloWorld with Application {
|
||||||
```python
|
```python
|
||||||
print("Hello, World!")
|
print("Hello, World!")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```go-html-template
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>{{ .Title }}</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
{{ .Content }}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
```
|
||||||
|
|
||||||
|
```go-html-template
|
||||||
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
|
<h1>posts</h1>
|
||||||
|
{{ range first 10 .Data.Pages }}
|
||||||
|
{{ if eq .Type "post"}}
|
||||||
|
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<h1>pages</h1>
|
||||||
|
{{ range .Data.Pages }}
|
||||||
|
{{ if or (eq .Type "page") (eq .Type "about") }}
|
||||||
|
<h2><a href="{{ .Permalink }}">{{ .Type }} - {{ .Title }} - {{ .RelPermalink }}</a></h2>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ partial "footer.html" . }}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Detect the language
|
||||||
|
|
||||||
|
```
|
||||||
|
package hello
|
||||||
|
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
println("Hello World!")
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
<?php
|
||||||
|
echo 'Hello, World!';
|
||||||
|
?>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
By `{{</* highlight go-html-template "linenos=table,hl_lines=1 3-7,linenostart=199" */>}}..{{</* / highlight */>}}`
|
||||||
|
|
||||||
|
{{< highlight go-html-template "linenos=table,hl_lines=1 3-7,linenostart=199" >}}
|
||||||
|
<section id="main">
|
||||||
|
<div>
|
||||||
|
<h1 id="title">{{ .Title }}</h1>
|
||||||
|
{{ range .Data.Pages }}
|
||||||
|
{{ .Render "summary"}}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{{< / highlight >}}
|
||||||
|
|
Loading…
Reference in a new issue