Browse Source

implement chroma highlighting

pull/6/head
Nicolas Massé 6 years ago
parent
commit
66ed316012
  1. 4
      .gitmodules
  2. 6
      README.md
  3. 1
      config.toml
  4. 4
      content/blog/enable-global-policies-apicast.md
  5. 4
      netlify.toml
  6. 1
      static/css/.gitignore
  7. 2
      themes/cocoa

4
.gitmodules

@ -1,4 +1,4 @@
[submodule "themes/cocoa"]
path = themes/cocoa
url = https://github.com/nishanths/cocoa-hugo-theme.git
branch = v0.6.0
url = https://github.com/nmasse-itix/cocoa-hugo-theme.git
branch = nmasse-itix

6
README.md

@ -61,3 +61,9 @@ You can update a theme to the latest version by executing the following command
git submodule update --rebase --remote
```
## How to change the Chroma style for syntax highlighting
```sh
mkdir -p static/css
hugo gen chromastyles --style=perldoc > static/css/chroma.css
```

1
config.toml

@ -3,6 +3,7 @@ languageCode = "en-us"
title = "Nicolas Massé"
author = "Nicolas Massé"
theme = "cocoa"
pygmentsUseClasses = true
[taxonomies]
opensource = "opensource"

4
content/blog/enable-global-policies-apicast.md

@ -19,7 +19,7 @@ Start from those default *Environment Files* and add a `policy_chain` field with
The default *Global Policy Chain* can be found in the [`gateway/src/apicast/policy_chain.lua`](https://github.com/3scale/APIcast/blob/b8f7f067dd47936f93bc9bd3e6de224c304d58ea/gateway/src/apicast/policy_chain.lua#L67-L72) file.
**production.lua:**
```lua
{{< highlight lua >}}
return {
master_process = 'on',
lua_code_cache = 'on',
@ -35,7 +35,7 @@ return {
'apicast.policy.nginx_metrics'
}),
}
```
{{< / highlight >}}
**staging.lua:**
```lua

4
netlify.toml

@ -1,6 +1,6 @@
[build]
publish = "public"
command = "hugo"
command = "hugo gen chromastyles --style=perldoc > static/css/chroma.css && hugo"
[build.environment] # Global
HUGO_VERSION = "0.42"
@ -9,7 +9,7 @@ HUGO_VERSION = "0.42"
HUGO_VERSION = "0.42"
[context.deploy-preview]
command = "hugo --buildDrafts --buildFuture --baseURL $DEPLOY_PRIME_URL"
command = "hugo gen chromastyles --style=perldoc > static/css/chroma.css && hugo --buildDrafts --buildFuture --baseURL $DEPLOY_PRIME_URL"
[context.deploy-preview.environment]
HUGO_ENABLEGITINFO = "true"

1
static/css/.gitignore

@ -0,0 +1 @@
chroma.css

2
themes/cocoa

@ -1 +1 @@
Subproject commit 9592a80a742c54b6e4d43ab020552c863fc41bc0
Subproject commit 0cd0defed65fa7f4de8c81b7d1eb4fd92b302d1f
Loading…
Cancel
Save