Skip to content

Commit fff643d

Browse files
defunkt-devdasathyakuma
andauthored
Add Marko framework support (marko-virtual) to the site (#1019)
feat: marko-virtual integration Co-authored-by: dasathyakuma <dasathyakuma@ebay.com>
1 parent 3814388 commit fff643d

11 files changed

Lines changed: 130 additions & 4 deletions

File tree

src/components/FileExplorer.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import htmlIconUrl from '~/images/file-icons/html.svg?url'
66
import jsonIconUrl from '~/images/file-icons/json.svg?url'
77
import svelteIconUrl from '~/images/file-icons/svelte.svg?url'
88
import vueIconUrl from '~/images/file-icons/vue.svg?url'
9+
import markoIconUrl from '~/images/file-icons/marko.svg?url'
910
import textIconUrl from '~/images/file-icons/txt.svg?url'
1011
import type { GitHubFileNode } from '~/utils/documents.server'
1112
import { twMerge } from 'tailwind-merge'
@@ -30,6 +31,8 @@ const getFileIconPath = (filename: string) => {
3031
return svelteIconUrl
3132
case 'vue':
3233
return vueIconUrl
34+
case 'marko':
35+
return markoIconUrl
3336
default:
3437
return textIconUrl
3538
}

src/components/markdown/codeBlock.shared.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ export function getCodeBlockLanguageFromFilePath(filePath: string) {
8686
if (['prettierrc', 'babelrc', 'webmanifest'].includes(ext)) return 'json'
8787
if (['env', 'example'].includes(ext)) return 'sh'
8888

89+
// Marko is HTML-based; @tanstack/highlight has no Marko grammar, so fall
90+
// back to html for reasonable tag/attribute/string coloring.
91+
if (ext === 'marko') return 'html'
92+
8993
if (
9094
[
9195
'gitignore',

src/images/file-icons/marko.svg

Lines changed: 54 additions & 0 deletions
Loading

src/images/marko-logo.svg

Lines changed: 54 additions & 0 deletions
Loading

src/libraries/frameworks.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import alpineLogo from '../images/alpine-logo.svg'
22
import angularLogo from '../images/angular-logo.svg'
33
import jsLogo from '../images/js-logo.svg'
44
import litLogo from '../images/lit-logo.svg'
5+
import markoLogo from '../images/marko-logo.svg'
56
import qwikLogo from '../images/qwik-logo.svg'
67
import preactLogo from '../images/preact-logo.svg'
78
import reactLogo from '../images/react-logo.svg'
@@ -53,6 +54,13 @@ export const frameworkOptions = [
5354
color: 'bg-orange-600',
5455
fontColor: 'text-orange-600',
5556
},
57+
{
58+
label: 'Marko',
59+
value: 'marko',
60+
logo: markoLogo,
61+
color: 'bg-cyan-500',
62+
fontColor: 'text-cyan-500',
63+
},
5664
{
5765
label: 'Qwik',
5866
value: 'qwik',

src/libraries/libraries.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ export const virtual: LibrarySlim = {
428428
to: '/virtual',
429429
tagline: 'Headless UI for Virtualizing Large Element Lists',
430430
description:
431-
'Virtualize only the visible content for massive scrollable DOM nodes at 60FPS in TS/JS, React, Vue, Solid, Svelte, Lit & Angular while retaining 100% control over markup and styles.',
431+
'Virtualize only the visible content for massive scrollable DOM nodes at 60FPS in TS/JS, React, Vue, Solid, Svelte, Lit, Angular & Marko while retaining 100% control over markup and styles.',
432432
bgStyle: 'bg-purple-500',
433433
borderStyle: 'border-purple-500/50',
434434
textStyle: 'text-purple-500',
@@ -438,7 +438,7 @@ export const virtual: LibrarySlim = {
438438
bgRadial: 'from-purple-500 via-violet-600/50 to-transparent',
439439
badge: undefined,
440440
repo: 'tanstack/virtual',
441-
frameworks: ['react', 'solid', 'vue', 'svelte', 'lit', 'angular'],
441+
frameworks: ['react', 'solid', 'vue', 'svelte', 'lit', 'angular', 'marko'],
442442
corePackageName: '@tanstack/virtual-core',
443443
npmPackageNames: ['@tanstack/virtual-core', 'react-virtual'],
444444
latestVersion: 'v3',

src/libraries/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export type Framework =
77
| 'angular'
88
| 'alpine'
99
| 'lit'
10+
| 'marko'
1011
| 'preact'
1112
| 'qwik'
1213
| 'react'

src/libraries/virtual.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const textStyles = 'text-violet-700 dark:text-violet-400'
77

88
export const virtualProject = {
99
...virtual,
10-
description: `Virtualize only the visible content for massive scrollable DOM nodes at 60FPS in TS/JS, React, Vue, Solid, Svelte, Lit & Angular while retaining 100% control over markup and styles.`,
10+
description: `Virtualize only the visible content for massive scrollable DOM nodes at 60FPS in TS/JS, React, Vue, Solid, Svelte, Lit, Angular & Marko while retaining 100% control over markup and styles.`,
1111
latestBranch: 'main',
1212
bgRadial: 'from-purple-500 via-violet-600/50 to-transparent',
1313
textColor: 'text-purple-600',

src/utils/llms.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const frameworkLabels: Record<Framework, string> = {
4242
angular: 'Angular',
4343
alpine: 'Alpine',
4444
lit: 'Lit',
45+
marko: 'Marko',
4546
preact: 'Preact',
4647
qwik: 'Qwik',
4748
react: 'React',

src/utils/npm-packages.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export const frameworkMeta: Record<Framework, { name: string; color: string }> =
2626
solid: { name: 'Solid', color: '#2C4F7C' },
2727
vue: { name: 'Vue', color: '#42B883' },
2828
svelte: { name: 'Svelte', color: '#FF3E00' },
29+
marko: { name: 'Marko', color: '#44bfef' },
2930
angular: { name: 'Angular', color: '#DD0031' },
3031
alpine: { name: 'Alpine', color: '#77C1D2' },
3132
lit: { name: 'Lit', color: '#325CFF' },

0 commit comments

Comments
 (0)