diff --git a/back/src/components/posts/code.json b/back/src/components/posts/code.json index cce114d9a..299946ba9 100644 --- a/back/src/components/posts/code.json +++ b/back/src/components/posts/code.json @@ -37,7 +37,9 @@ "HTML", "Shell", "Svelte", - "plaintext" + "plaintext", + "YAML", + "Dockerfile" ], "required": true, "default": "plaintext" diff --git a/front/src/lib/components/posts/Code/Code.svelte b/front/src/lib/components/posts/Code/Code.svelte index ac7398a6b..6f2483741 100644 --- a/front/src/lib/components/posts/Code/Code.svelte +++ b/front/src/lib/components/posts/Code/Code.svelte @@ -6,6 +6,8 @@ import json from 'svelte-highlight/languages/json'; import plaintext from 'svelte-highlight/languages/plaintext'; import xml from 'svelte-highlight/languages/xml'; + import yaml from 'svelte-highlight/languages/yaml'; + import dockerfile from 'svelte-highlight/languages/dockerfile'; import CodeCopy from './CodeCopy.svelte'; import '@styles/components/Code/Code.css'; @@ -32,6 +34,8 @@ json, hcl: javascript, html: xml, + yaml: yaml, + dockerfile: dockerfile, }; let language = which[langLower] || plaintext; diff --git a/front/src/lib/styles/components/Code/Code.css b/front/src/lib/styles/components/Code/Code.css index 032a7a61b..a5afb67d2 100644 --- a/front/src/lib/styles/components/Code/Code.css +++ b/front/src/lib/styles/components/Code/Code.css @@ -131,6 +131,9 @@ } &.headerless, &.titleless { + .syntax-highlighter__screen-wrap { + padding-bottom: 0.25rem; + } > pre { padding-top: 1rem; }