From f1e94423dce48deca9d0287e24131e52720b175a Mon Sep 17 00:00:00 2001 From: Yash Mehrotra Date: Mon, 21 Jun 2021 07:55:20 +0530 Subject: [PATCH] feat: Syntax highlighting --- README.md | 1 + exampleSite/config.toml | 5 ++--- exampleSite/content/posts/first_post.md | 23 ++++++++++++++++++++++- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c251fe8..32c159e 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ git submodule add https://github.com/526avijitgupta/gokarna.git themes/gokarna - Navbar - Footer - Inject html +- Syntax highlighting (Choose one of emacs, trac, perldoc) ## LICENSE diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 360c72d..779f3a2 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -6,9 +6,8 @@ defaultContentLanguage = "en" paginate = 20 -pygmentsStyle = "bw" -pygmentsCodeFences = true -pygmentsCodeFencesGuessSyntax = true +# Choose one of emacs, trac or perldoc +pygmentsStyle = "emacs" [params] footer = "The Marauders" diff --git a/exampleSite/content/posts/first_post.md b/exampleSite/content/posts/first_post.md index b8130b1..9492084 100644 --- a/exampleSite/content/posts/first_post.md +++ b/exampleSite/content/posts/first_post.md @@ -22,8 +22,29 @@ Yo yo yo 5. list ```py -Codeblocks look like this +# Codeblocks look like this def print(): print('Hello world!') ``` + +```golang +package main + +import ( + "fmt" +) + +// This is a comment +func main () { + fmt.Println("Hello, world!") +} +``` + +```bash +PATH=$HOME + +cat $HOME/file.txt | while read -n data; do + echo $data +done +```