Skip to content

Commit 149438e

Browse files
committed
Enable Prism highlighting and fix code-block display
The `@vuepress/plugin-prismjs` package shipped in package.json but was never registered, so fences with a language hint (```bash, ```json, ```markdown, ...) produced no tokens. Combined with a global :not(.language-text) > code rule that painted any non-text block's text in dark blue (#1f3f5b) and a code-fade-mask gradient that assumed a dark background variable nobody set, this rendered as dark-blue-on-black strips on the right side of every highlighted block. Changes: * Register prismjsPlugin in config-user/plugins.ts so language hints are tokenised at build time. * Scope the inline-code rule to :not(pre):not(.language-text) > code so the global #1f3f5b color and light-gray background only apply to inline <code>, not to <pre><code> inside .language-* blocks. * Set --code-bg-color: #2d2d2d (the project's original dark surface) and apply it to every language-* wrapper, with #ccc as the default text/punctuation color, matching the pre-Prism appearance. * Add a One-Dark-inspired Prism token palette scoped to div[class*="language-"] so bash/json/yaml/php blocks render with readable colors on the dark background. * Unify font-size: 12px across every language-* block so highlighted blocks no longer render larger than plain `text` blocks. * Re-tint the code-fade-mask gradient to the same #2d2d2d background so the right-edge fade blends with the block. * Scope the ELSSteps :deep(code) override to :not(pre) > code so block code inside steps uses the unified 12px size while inline code keeps the slightly smaller 0.85rem. * Indent the bullet sub-items under steps 1 and 2 in the AlmaLinux enterprise-support doc so they render inside the numbered list instead of after it. https://claude.ai/code/session_01RnQn6mjZMSy5kGjwJaWVeF
1 parent f64d42a commit 149438e

4 files changed

Lines changed: 96 additions & 13 deletions

File tree

docs/.vuepress/components/ELSSteps.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
margin: 0.5rem 0;
8787
}
8888
89-
.els-steps-body :deep(code) {
89+
.els-steps-body :deep(:not(pre) > code) {
9090
font-size: 0.85rem;
9191
}
9292
</style>

docs/.vuepress/config-user/plugins.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import {containerPlugin} from "@vuepress/plugin-container";
22
import {ContainerPluginOptions} from "@vuepress/plugin-container/lib/node/containerPlugin";
33
import { registerComponentsPlugin } from '@vuepress/plugin-register-components'
4+
import { prismjsPlugin } from '@vuepress/plugin-prismjs'
45
import { path } from '@vuepress/utils'
56

67
export default [
8+
prismjsPlugin(),
79
containerPlugin({
810
type: 'warning',
911
before: info => `<div class="warning custom-block"><p class="custom-block-title">${info}</p>`,

docs/.vuepress/styles/theme.styl

Lines changed: 87 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,18 +194,99 @@ th, td
194194
.custom-layout
195195
padding-top 0
196196

197-
.language-text
198-
border-radius 6px
199-
font-size 12px
200-
201-
:not(.language-text) > code
197+
// Inline code only — explicitly exclude <pre><code> so Prism-highlighted
198+
// blocks keep their own color/background instead of inheriting dark-blue.
199+
:not(pre):not(.language-text) > code
202200
color: #1f3f5b
203201
padding: 0.25rem 0.5rem
204202
margin: 0
205203
font-size: .85em
206204
background-color: rgba(27,31,35,.05)
207205
border-radius: 3px
208206

207+
// Dark code-block surface — shared by every language-* wrapper and the
208+
// fade mask below so the right-edge gradient blends in. Font-size matches
209+
// what .language-text used to set so bash/json/etc render at the same
210+
// size as the existing text blocks.
211+
:root
212+
--code-bg-color: #2d2d2d
213+
214+
div[class*="language-"]
215+
background-color var(--code-bg-color)
216+
border-radius 6px
217+
font-size 12px
218+
219+
div[class*="language-"] > pre
220+
background-color transparent
221+
color #ccc
222+
padding 1rem
223+
224+
div[class*="language-"] > pre > code
225+
background-color transparent
226+
color inherit
227+
font-size inherit
228+
229+
// One Dark token palette. Applied only inside code blocks so inline
230+
// <code> and inline highlighted text are unaffected.
231+
div[class*="language-"]
232+
.token.comment,
233+
.token.prolog,
234+
.token.doctype,
235+
.token.cdata
236+
color #5c6370
237+
font-style italic
238+
239+
.token.punctuation
240+
color #ccc
241+
242+
.token.namespace
243+
opacity .7
244+
245+
.token.property,
246+
.token.tag,
247+
.token.boolean,
248+
.token.number,
249+
.token.constant,
250+
.token.symbol,
251+
.token.deleted
252+
color #d19a66
253+
254+
.token.selector,
255+
.token.attr-name,
256+
.token.string,
257+
.token.char,
258+
.token.builtin,
259+
.token.inserted
260+
color #98c379
261+
262+
.token.operator,
263+
.token.entity,
264+
.token.url,
265+
.language-css .token.string,
266+
.style .token.string
267+
color #56b6c2
268+
269+
.token.atrule,
270+
.token.attr-value,
271+
.token.keyword
272+
color #c678dd
273+
274+
.token.function,
275+
.token.class-name
276+
color #61afef
277+
278+
.token.regex,
279+
.token.important,
280+
.token.variable
281+
color #e06c75
282+
283+
.token.important,
284+
.token.bold
285+
font-weight bold
286+
287+
.token.italic
288+
font-style italic
289+
209290
badge[type="warning"]
210291
display: inline-block
211292
padding: 0.2em 0.5em;
@@ -310,7 +391,7 @@ div[class*="language-"]
310391
bottom 14px // keep scrollbar fully visible
311392
width 90px
312393
pointer-events none
313-
background linear-gradient(to right, rgba(40, 44, 52, 0) 0%, var(--code-bg-color, #282c34) 55%)
394+
background linear-gradient(to right, rgba(45, 45, 45, 0) 0%, var(--code-bg-color, #2d2d2d) 55%)
314395
z-index 5
315396
border-top-right-radius 6px
316397
opacity 1

docs/enterprise-support-for-almalinux/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -635,15 +635,15 @@ TuxCare Technical Support is designed for enterprise clients with trained IT sta
635635

636636
1. Technical Support ticketing system: [https://tuxcare.com/support-portal/](https://tuxcare.com/support-portal/)
637637

638-
* Acceptance of requests 24 hours a day, 365 days a year
639-
* Unlimited number of tickets may be submitted
640-
* Customers will be supplied with instructions describing the use of the ticketing system during onboarding
641-
* User accounts will be created for each nominated user within each client organization
642-
* User accounts will have access to log, view and respond to tickets
638+
* Acceptance of requests 24 hours a day, 365 days a year
639+
* Unlimited number of tickets may be submitted
640+
* Customers will be supplied with instructions describing the use of the ticketing system during onboarding
641+
* User accounts will be created for each nominated user within each client organization
642+
* User accounts will have access to log, view and respond to tickets
643643

644644
2. Email: acceptance of requests 24 hours a day, 365 days a year:
645645

646-
* New tickets may be created by simply emailing the support desk: [support@tuxcare.com](support@tuxcare.com)
646+
* New tickets may be created by simply emailing the support desk: [support@tuxcare.com](support@tuxcare.com)
647647

648648
:::warning
649649
If you are a user of our server product AMI's on AWS Marketplace, before you contact support, you should have your AWS accountId to hand, there are various ways to find it.

0 commit comments

Comments
 (0)