From f78cc005f4c91b814024d08747864aba3fa8cee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D7=A0=CF=85=CE=B1=CE=B7=20=D7=A0=CF=85=CE=B1=CE=B7=D1=95?= =?UTF-8?q?=CF=83=CE=B7?= Date: Sun, 31 Dec 2023 13:44:18 -0800 Subject: [PATCH] docs: add additional language styles --- docs/docs/configuration.md | 4 +- docs/docs/installation.md | 4 +- docs/docs/testing.md | 8 +- docs/docs/usage.md | 4 +- docs/docusaurus.config.js | 6 +- docs/src/css/prism-rose-pine-moon.css | 201 ++++++++++++++++++++++++++ 6 files changed, 216 insertions(+), 11 deletions(-) create mode 100644 docs/src/css/prism-rose-pine-moon.css diff --git a/docs/docs/configuration.md b/docs/docs/configuration.md index b03149e..c5aa245 100644 --- a/docs/docs/configuration.md +++ b/docs/docs/configuration.md @@ -51,7 +51,7 @@ repositories: The config file can be overriden/defined through env vars. -``` +```bash GILT_GILTFILE=Giltfile.yaml \ GILT_GILTDIR=~/.gilt/clone \ GILT_DEBUG=false \ @@ -62,7 +62,7 @@ go-gilt overlay The config file and/or env vars can be overriden/defined through cli flags. -``` +```bash go-gilt \ --gilt-file=Giltfile.yaml \ --gilt-dir=~/.gilt/clone \ diff --git a/docs/docs/installation.md b/docs/docs/installation.md index 29a763d..543dca5 100644 --- a/docs/docs/installation.md +++ b/docs/docs/installation.md @@ -6,12 +6,12 @@ sidebar_position: 2 ## Homebrew Tap -``` +```bash brew install retr0h/tap/go-gilt ``` ## Go Install -``` +```bash go install github.com/retr0h/go-gilt@latest ``` diff --git a/docs/docs/testing.md b/docs/docs/testing.md index 1969fd0..2fac839 100644 --- a/docs/docs/testing.md +++ b/docs/docs/testing.md @@ -6,24 +6,24 @@ sidebar_position: 5 Check installed dependencies: -``` +```bash task deps:check ``` To execute tests: -``` +```bash task test ``` Auto format code: -``` +```bash task fmt ``` List helpful targets: -``` +```bash task ``` diff --git a/docs/docs/usage.md b/docs/docs/usage.md index 98aeb02..7cd849c 100644 --- a/docs/docs/usage.md +++ b/docs/docs/usage.md @@ -10,7 +10,7 @@ sidebar_position: 4 Overlay a remote repository into the destination provided. -``` +```bash gilt overlay ``` @@ -18,7 +18,7 @@ gilt overlay Display the git commands being executed. -``` +```bash gilt --debug overlay ``` diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index a0a9422..7483a88 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -47,7 +47,10 @@ const config = { blog: {}, pages: {}, theme: { - customCss: './src/css/custom.css', + customCss: [ + './src/css/custom.css', + './src/css/prism-rose-pine-moon.css', + ], }, }), ], @@ -107,6 +110,7 @@ const config = { prism: { theme: prismThemes.github, darkTheme: prismThemes.dracula, + additionalLanguages: ['bash', 'json', 'yaml'], }, colorMode: { defaultMode: 'dark', diff --git a/docs/src/css/prism-rose-pine-moon.css b/docs/src/css/prism-rose-pine-moon.css new file mode 100644 index 0000000..2a75b18 --- /dev/null +++ b/docs/src/css/prism-rose-pine-moon.css @@ -0,0 +1,201 @@ +/** + * MIT License + * Rosé Pine Theme + * https://github.com/rose-pine + * Ported for PrismJS by fvrests [@fvrests] + */ + + code[class*="language-"], + pre[class*="language-"] { + color: #e0def4; + background: #232136; + font-family: "Cartograph CF", ui-monospace, SFMono-Regular, Menlo, Monaco, + Consolas, "Liberation Mono", "Courier New", monospace; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; + + @media print { + text-shadow: none; + } + } + + /* Selection */ + code[class*="language-"]::-moz-selection, + pre[class*="language-"]::-moz-selection, + code[class*="language-"] ::-moz-selection, + pre[class*="language-"] ::-moz-selection { + background: #312f44; + } + + code[class*="language-"]::selection, + pre[class*="language-"]::selection, + code[class*="language-"] ::selection, + pre[class*="language-"] ::selection { + background: #312f44; + } + + /* Code (block & inline) */ + :not(pre) > code[class*="language-"], + pre[class*="language-"] { + color: #e0def4; + background: #232136; + } + + /* Code blocks */ + pre[class*="language-"] { + padding: 1em; + margin: 0.5em 0; + overflow: auto; + } + + /* Inline code */ + :not(pre) > code[class*="language-"] { + padding: 0.1em; + border-radius: 0.3em; + white-space: normal; + color: #e0def4; + background: #232136; + } + + /* Text style & opacity */ + .token.entity { + cursor: help; + } + + .token.important, + .token.bold { + font-weight: bold; + } + + .token.italic, + .token.selector, + .token.doctype, + .token.attr-name, + .token.inserted, + .token.deleted, + .token.comment, + .token.prolog, + .token.cdata, + .token.constant, + .token.parameter, + .token.url { + font-style: italic; + } + + .token.url { + text-decoration: underline; + } + + .namespace { + opacity: 0.7; + } + + /* Syntax highlighting */ + .token.constant { + color: #e0def4; + } + + .token.comment, + .token.prolog, + .token.cdata, + .token.punctuation { + color: #59546d; + } + + .token.delimiter, + .token.important, + .token.atrule, + .token.operator, + .token.keyword { + color: #3e8fb0; + } + + .token.tag, + .token.tag .punctuation, + .token.doctype, + .token.variable, + .token.regex, + .token.class-name, + .token.selector, + .token.inserted { + color: #9ccfd8; + } + + .token.boolean, + .token.entity, + .token.number, + .token.symbol, + .token.function { + color: #ea9a97; + } + + .token.string, + .token.char, + .token.property, + .token.attr-value, + .token.attr-value .punctuation { + color: #f6c177; + } + + .token.parameter, + .token.url, + .token.name, + .token.attr-name, + .token.builtin { + color: #c4a7e7; + } + + .token.deleted { + color: #eb6f92; + } + + /* Insertions & deletions */ + .token.inserted { + background: rgba(156 207 216 0.12); + } + + .token.deleted { + background: rgba(235 111 146 0.12); + } + + /* Line highlighting */ + pre[data-line] { + position: relative; + } + + pre[class*="language-"] > code[class*="language-"] { + position: relative; + z-index: 1; + } + + .line-highlight, + .highlight-lines .highlighted { + position: absolute; + left: 0; + right: 0; + padding: inherit 0; + margin-top: 1em; + + background: #312f44; + box-shadow: inset 5px 0 0 #e0def4; + + z-index: 0; + + pointer-events: none; + + line-height: inherit; + white-space: pre; + }