Skip to content

Commit 2568baf

Browse files
authored
fix(docs): upgrade comark-docs and fix logo layout shift (#330)
1 parent 529c6de commit 2568baf

5 files changed

Lines changed: 584 additions & 397 deletions

File tree

‎docs/app/app.config.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ export default defineAppConfig({
99
title: 'Devframe',
1010
logo: {
1111
alt: 'Devframe',
12-
light: '/logo.svg',
13-
dark: '/logo.svg',
12+
mark: 'devframe',
1413
},
1514
nav: [
1615
{

‎docs/app/components/LogoMark.vue‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<script setup lang="ts">
2+
defineProps<{
3+
name?: string
4+
}>()
5+
</script>
6+
7+
<template>
8+
<svg class="h-6 w-auto" viewBox="0 0 500 500" fill="none" xmlns="http://www.w3.org/2000/svg">
9+
<g filter="url(#filter0_d_8_208)">
10+
<path d="M238.464 40H66V236.007H104.577C220.688 236.007 232.79 158.437 232.79 121.733C232.79 108.867 243.38 108.867 243.38 121.733C251.318 236.701 356.35 245.457 365.527 246.223L365.542 246.224C374.619 246.981 382.561 251.521 365.542 254.548C253.592 264.765 243.758 364.282 243.38 375.634C243.002 386.986 235.438 399.851 232.79 375.634C222.957 274.603 144.289 257.954 104.577 257.954H66V460.772H238.464C358.356 460.772 452.152 371.472 452.152 251.521C452.152 131.571 356.465 40 238.464 40Z" fill="url(#paint0_radial_8_208)" />
11+
<path d="M238.464 40H66V236.007H104.577C220.688 236.007 232.79 158.437 232.79 121.733C232.79 108.867 243.38 108.867 243.38 121.733C251.318 236.701 356.35 245.457 365.527 246.223L365.542 246.224C374.619 246.981 382.561 251.521 365.542 254.548C253.592 264.765 243.758 364.282 243.38 375.634C243.002 386.986 235.438 399.851 232.79 375.634C222.957 274.603 144.289 257.954 104.577 257.954H66V460.772H238.464C358.356 460.772 452.152 371.472 452.152 251.521C452.152 131.571 356.465 40 238.464 40Z" stroke="#86997F" stroke-opacity="0.5" stroke-width="1.33156" />
12+
</g>
13+
<defs>
14+
<filter id="filter0_d_8_208" x="60.7404" y="39.3342" width="396.671" height="431.358" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
15+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
16+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" />
17+
<feOffset dy="4.66045" />
18+
<feGaussianBlur stdDeviation="2.29694" />
19+
<feComposite in2="hardAlpha" operator="out" />
20+
<feColorMatrix type="matrix" values="0 0 0 0 0.25464 0 0 0 0 0.285175 0 0 0 0 0.243391 0 0 0 0.1 0" />
21+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_8_208" />
22+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_8_208" result="shape" />
23+
</filter>
24+
<radialGradient id="paint0_radial_8_208" cx="0" cy="0" r="1" gradientTransform="matrix(399.011 555.102 -568.423 408.982 -11.6221 -34.9218)" gradientUnits="userSpaceOnUse">
25+
<stop stop-color="#ADC77F" />
26+
<stop offset="0.71903" stop-color="#517158" />
27+
<stop offset="1" stop-color="#486954" />
28+
</radialGradient>
29+
</defs>
30+
</svg>
31+
</template>

‎patches/comark-docs@0.0.1.patch‎

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,13 @@
11
diff --git a/server/utils/content.ts b/server/utils/content.ts
2-
index e30eeb312d00dd6111b5574680e6b8b725d7cb76..2d6d6e570dfef6537276dc4a613f3cd5fcbf4e8c 100644
32
--- a/server/utils/content.ts
43
+++ b/server/utils/content.ts
5-
@@ -1,14 +1,15 @@
6-
import { defineContentPlugin, type ComarkContent, type CacheOptions, comarkContent } from 'comark-content';
7-
import fs from 'comark-content/sources/fs'
8-
import github from 'comark-content/sources/github'
4+
@@ -4 +4 @@
95
-import rangi from 'comark/plugins/rangi'
106
+import shiki from 'comark/plugins/shiki'
11-
import security from 'comark/plugins/security'
12-
import emoji from 'comark/plugins/emoji'
13-
import toc from 'comark/plugins/toc'
14-
import mermaid from 'comark/plugins/mermaid'
15-
import yaml from 'comark-content/plugins/yaml'
16-
import tracingOtel from 'comark-content/plugins/tracing/otel'
17-
-import { githubLight, githubDark } from 'rangi/themes'
7+
@@ -12 +12,2 @@
8+
-import { geistTheme } from '../../utils/geist-theme.ts'
189
+import vitesseDark from '@shikijs/themes/vitesse-dark'
1910
+import vitesseLight from '@shikijs/themes/vitesse-light'
20-
import { contentTracer } from './tracer.ts'
21-
22-
// Rebuilt only when the head advances (see `getProdContent`). Holds the *promise*, not the instance: the
23-
@@ -18,7 +19,7 @@ let content: Promise<ComarkContent> | undefined
24-
// Bump CONTENT_PARSER_VERSION in `cache.ts` when these plugins or their options change cached output.
25-
const comarkPlugins = [
26-
mermaid({ theme: 'zinc-light', themeDark: 'zinc-dark' }),
27-
- rangi({ theme: { light: githubLight, dark: githubDark } }),
11+
@@ -21 +22 @@
12+
- rangi({ theme: geistTheme }),
2813
+ shiki({ registerDefaultThemes: false, themes: { light: vitesseLight, dark: vitesseDark } }),
29-
toc({ depth: 3 }),
30-
emoji(),
31-
security({

0 commit comments

Comments
 (0)