diff --git a/.gitmodules b/.gitmodules index 439acc9..b765757 100644 --- a/.gitmodules +++ b/.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 diff --git a/README.md b/README.md index e1519c6..58de874 100644 --- a/README.md +++ b/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 +``` diff --git a/config.toml b/config.toml index d0d6276..2def510 100644 --- a/config.toml +++ b/config.toml @@ -3,6 +3,7 @@ languageCode = "en-us" title = "Nicolas Massé" author = "Nicolas Massé" theme = "cocoa" +pygmentsUseClasses = true [taxonomies] opensource = "opensource" diff --git a/content/blog/enable-global-policies-apicast.md b/content/blog/enable-global-policies-apicast.md index a8fabf7..21020a8 100644 --- a/content/blog/enable-global-policies-apicast.md +++ b/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 diff --git a/netlify.toml b/netlify.toml index 2c794bd..71e366e 100644 --- a/netlify.toml +++ b/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" diff --git a/static/css/.gitignore b/static/css/.gitignore new file mode 100644 index 0000000..10c9f55 --- /dev/null +++ b/static/css/.gitignore @@ -0,0 +1 @@ +chroma.css diff --git a/themes/cocoa b/themes/cocoa index 9592a80..0cd0def 160000 --- a/themes/cocoa +++ b/themes/cocoa @@ -1 +1 @@ -Subproject commit 9592a80a742c54b6e4d43ab020552c863fc41bc0 +Subproject commit 0cd0defed65fa7f4de8c81b7d1eb4fd92b302d1f