forked from mirrors/hugo-tufte
Improve code blocks styling (#13)
* add highlight config for code highlighter * add default pygment css "github" * fix styles for code blocks * remove dead html from margin note *These don't appear to do anything? * Fix scrolling in code block * More CSS fixes for code blocks * ignore generated scss files. Probably other generated files too * Use scss to generate more powerful styles for code blocks * Document new code blocks style option Improve code blocks styling
This commit is contained in:
parent
835a8701f8
commit
ba23674640
11 changed files with 311 additions and 124 deletions
exampleSite/content/post
|
@ -60,7 +60,8 @@ $$
|
|||
<!-- See https://github.com/jgm/pandoc/issues/3953#issuecomment-334670625 -->
|
||||
|
||||
is produced from
|
||||
```
|
||||
|
||||
```txt
|
||||
<p>
|
||||
$$
|
||||
\begin{aligned}
|
||||
|
@ -100,7 +101,7 @@ the `newthought` shortcode.
|
|||
### Code
|
||||
As an example of some inline code: `go test -v -short`.
|
||||
And this is some block-code:
|
||||
```go
|
||||
```go {linenos=table,hl_lines=["2-5"],linenostart=199}
|
||||
package main
|
||||
|
||||
import "log"
|
||||
|
@ -115,6 +116,24 @@ func main() {
|
|||
log.Println(y)
|
||||
}
|
||||
```
|
||||
|
||||
Here's an example without line numbers.
|
||||
```go {hl_lines=["2-5"],linenostart=199}
|
||||
package main
|
||||
|
||||
import "log"
|
||||
|
||||
func add(x int, y int) int {
|
||||
log.Println("We are going to take the sum of two numbers, and leave a very very very long comment.")
|
||||
return x + y
|
||||
}
|
||||
|
||||
func main() {
|
||||
y := add(1, 2)
|
||||
log.Println(y)
|
||||
}
|
||||
```
|
||||
|
||||
### Figure
|
||||
Below we have an example of a regular width figure.
|
||||
{{< figure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue