1
0
Fork 0
forked from mirrors/hugo-tufte

Improve code blocks styling ()

* 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:
TuckerD 2021-08-03 16:18:19 -04:00 committed by GitHub
commit ba23674640
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 311 additions and 124 deletions
exampleSite/content/post

View file

@ -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