π The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.
Vue dockergolangkanbanknowledge-baseknowledge-managementmarkdownnote-takingnotesnotes-appnotionnuxtnuxtjsoffline-firstoidcpwaselfhostedssovuevuejswiki
New markdown syntax & improve tags
Smaug6739ec1975d6d211
diff --git a/frontend/bun.lock b/frontend/bun.lockindex 57fb52b1..f8355cd6 100644--- a/frontend/bun.lock+++ b/frontend/bun.lock@@ -11,9 +11,9 @@"@nuxtjs/color-mode": "^3.5.2","@pinia/nuxt": "^0.5.5","@types/katex": "^0.16.7",- "@types/markdown-it": "^13.0.9",+ "@types/markdown-it": "^14.1.2","@types/markdown-it-container": "^2.0.10",- "@types/node": "^20.17.30",+ "@types/node": "^20.17.31","katex": "^0.16.22","markdown-it": "^14.1.0","markdown-it-anchor": "^8.6.7",@@ -23,9 +23,9 @@"nuxt": "^3.16.2","pinia": "^2.3.1","punycode": "^2.3.1",- "sass": "^1.86.3",+ "sass": "^1.87.0","vue": "^3.5.13",- "vue-router": "^4.5.0",+ "vue-router": "^4.5.1",},},},@@ -352,13 +352,13 @@"@types/katex": ["@types/[email protected]", "", {}, "sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ=="],- "@types/linkify-it": ["@types/[email protected]", "", {}, "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw=="],+ "@types/linkify-it": ["@types/[email protected]", "", {}, "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q=="],- "@types/markdown-it": ["@types/[email protected]", "", { "dependencies": { "@types/linkify-it": "^3", "@types/mdurl": "^1" } }, "sha512-1XPwR0+MgXLWfTn9gCsZ55AHOKW1WN+P9vr0PaQh5aerR9LLQXUbjfEAFhjmEmyoYFWAyuN2Mqkn40MZ4ukjBw=="],+ "@types/markdown-it": ["@types/[email protected]", "", { "dependencies": { "@types/linkify-it": "^5", "@types/mdurl": "^2" } }, "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog=="],"@types/markdown-it-container": ["@types/[email protected]", "", { "dependencies": { "@types/markdown-it": "*" } }, "sha512-zv+YxrlSYRq51e9kzm3orv4OvF4U79Ll1OyplNXr00o4ZC/8PukJk/jEWH7CnsMtrSWZlyv0czhz42jm9J4uLw=="],- "@types/mdurl": ["@types/[email protected]", "", {}, "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA=="],+ "@types/mdurl": ["@types/[email protected]", "", {}, "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg=="],"@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~6.19.2" } }, "sha512-quODOCNXQAbNf1Q7V+fI8WyErOCh0D5Yd31vHnKu4GkSztGQ7rlltAaqXhHhLl33tlVyUXs2386MkANSwgDn6A=="],diff --git a/frontend/helpers/markdown/container.ts b/frontend/helpers/markdown/container.tsindex 13e673e2..603464dd 100644--- a/frontend/helpers/markdown/container.ts+++ b/frontend/helpers/markdown/container.ts@@ -1,6 +1,6 @@import type MarkdownIt from 'markdown-it';-import type { RenderRule } from 'markdown-it/lib/renderer';import container from 'markdown-it-container';+import type { RenderRule } from 'markdown-it/lib/renderer.mjs';export const containerPlugin = (md: MarkdownIt) => {md.use(...createContainer('green', 'TIP', md))@@ -11,7 +11,9 @@ export const containerPlugin = (md: MarkdownIt) => {.use(...createContainer('details', 'Details', md)).use(...createContainer('turquoise', 'INFO', md)).use(...createInvisibleContainer('no-print'))- .use(...createInvisibleContainer('center'));+ .use(...createInvisibleContainer('center'))+ .use(...createInvisibleContainer('columns'))+ .use(...createInvisibleContainer('column'));};type ContainerArgs = [typeof container, string, { render: RenderRule }];diff --git a/frontend/package.json b/frontend/package.jsonindex e0be5539..53ec0e92 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -5,7 +5,7 @@"@nuxtjs/color-mode": "^3.5.2","@pinia/nuxt": "^0.5.5","@types/katex": "^0.16.7",- "@types/markdown-it": "^13.0.9",+ "@types/markdown-it": "^14.1.2","@types/markdown-it-container": "^2.0.10","@types/node": "^20.17.31","katex": "^0.16.22",diff --git a/frontend/pages/dashboard/categories/[id]/index.vue b/frontend/pages/dashboard/categories/[id]/index.vueindex d7817606..64ea8b80 100644--- a/frontend/pages/dashboard/categories/[id]/index.vue+++ b/frontend/pages/dashboard/categories/[id]/index.vue@@ -9,7 +9,7 @@<p class="document-description">{{ document.description }}</p></div><div class="document-tags" v-if="document.tags">- <span v-for="tag in document.tags.split(',')" :key="tag" class="tag blue">{{ tag.trim() }}</span>+ <tag v-for="tag in document.tags.split(',')" :key="tag" class="blue">{{ tag.trim() }}</tag></div><footer class="document-footer"><div class="footer-item">diff --git a/frontend/pages/dashboard/categories/index.vue b/frontend/pages/dashboard/categories/index.vueindex 7a469b3d..e329c44e 100644--- a/frontend/pages/dashboard/categories/index.vue+++ b/frontend/pages/dashboard/categories/index.vue@@ -1,7 +1,7 @@<template><div style="padding: 24px; gap: 16px" class="card-component"><header>- <h1 style="font-size: 20px">Workspaces & Categories <span class="tag blue" style="padding: 6px">New</span></h1>+ <h1 style="font-size: 20px">Workspaces & Categories <tag class="blue">New</tag></h1><div style="display: flex; gap: 8px"><AppButton type="primary" @click="createWorkspace">+ Workspace</AppButton><AppButton type="primary" @click="createCategory">+ Category</AppButton>diff --git a/frontend/pages/dashboard/cdn.vue b/frontend/pages/dashboard/cdn.vueindex ccb761ac..70ecbcca 100644--- a/frontend/pages/dashboard/cdn.vue+++ b/frontend/pages/dashboard/cdn.vue@@ -85,7 +85,7 @@ const rows: any = computed(() =>return {name: { content: res.filename },size: { content: readableFileSize(res.filesize) },- type: { content: `<span class="tag ${color(res.filetype)}">${res.filetype}</span>`, type: 'html' },+ type: { content: `<tag class="${color(res.filetype)}">${res.filetype}</tag>`, type: 'html' },date: { content: new Date(res.created_timestamp).toLocaleDateString() },action: { type: 'slot', data: res },};diff --git a/frontend/pages/dashboard/docs/_components/DocumentCardHeader.vue b/frontend/pages/dashboard/docs/_components/DocumentCardHeader.vueindex 75790271..c1ea2eb3 100644--- a/frontend/pages/dashboard/docs/_components/DocumentCardHeader.vue+++ b/frontend/pages/dashboard/docs/_components/DocumentCardHeader.vue@@ -8,7 +8,7 @@<h1 class="title">{{ doc?.name }}</h1><p class="description">{{ doc?.description }}</p><div class="document-tags" v-if="doc.tags">- <span v-for="tag in doc.tags.split(',')" :key="tag" class="tag blue">{{ tag.trim() }}</span>+ <tag v-for="tag in doc.tags.split(',')" :key="tag" class="blue">{{ tag.trim() }}</tag></div></div><div class="icon">diff --git a/frontend/pages/dashboard/docs/index.vue b/frontend/pages/dashboard/docs/index.vueindex d7ff1fc1..afa2c5eb 100644--- a/frontend/pages/dashboard/docs/index.vue+++ b/frontend/pages/dashboard/docs/index.vue@@ -24,16 +24,16 @@ const rows = computed(() =>let badges = '';switch (doc.accessibility) {case 1:- badges = '<span class="tag green">Document</span>';+ badges = '<tag class="green">Document</tag>';break;case 2:- badges = '<span class="tag turquoise">Draft</span>';+ badges = '<tag class="turquoise">Draft</tag>';break;case 3:- badges = '<span class="tag red">Archived</span>';+ badges = '<tag class="red">Archived</tag>';}- if (doc.parent_id) badges += '<span class="tag yellow">Child</span>';- if (documents.value.some(d => d.parent_id === doc.id)) badges += '<span class="tag yellow">Parent</span>';+ if (doc.parent_id) badges += '<tag class="yellow">Child</tag>';+ if (documents.value.some(d => d.parent_id === doc.id)) badges += '<tag class="yellow">Parent</tag>';return {name: { content: doc.name, type: 'text' as const },category: { content: categoriesStore.getById(doc.category || '')?.name || '', type: 'text' as const },@@ -50,7 +50,7 @@ function stringToBadge(str?: string): string {return str.trim().split(',')- .map(t => `<span class="tag blue">${t.trim()}</span>`)+ .map(t => `<tag class="blue">${t.trim()}</tag>`).join('');return '';}diff --git a/frontend/pages/dashboard/import.vue b/frontend/pages/dashboard/import.vueindex 2a74ed74..f9880c77 100644--- a/frontend/pages/dashboard/import.vue+++ b/frontend/pages/dashboard/import.vue@@ -1,7 +1,7 @@<template><div style="padding: 24px; gap: 16px" class="card-component"><header>- <h1 style="font-size: 20px">Import documents <span class="tag yellow" style="padding: 6px">Beta</span></h1>+ <h1 style="font-size: 20px">Import documents <tag class="yellow">Beta</tag></h1><p>You can import documents from a previous export. If you don't have export, you can create a new one from the <NuxtLink to="/dashboard/settings?p=backup">settings</NuxtLink> page.</p></header>@@ -22,7 +22,7 @@<p style="display: flex"><Icon name="file" /> {{ file.name }}- <span v-if="file.tags" v-for="tag in file.tags?.split(',')" :key="tag" class="tag blue">{{ tag.trim() }}</span>+ <tag v-if="file.tags" v-for="tag in file.tags?.split(',')" :key="tag" class="blue">{{ tag.trim() }}</tag></p><p>Created at: {{ new Date(file.created_timestamp).toLocaleDateString() }}</p><p>Updated at: {{ new Date(file.updated_timestamp).toLocaleDateString() }}</p>diff --git a/frontend/styles/components.scss b/frontend/styles/components.scssindex 665db342..f7881ab5 100644--- a/frontend/styles/components.scss+++ b/frontend/styles/components.scss@@ -7,4 +7,17 @@justify-content: flex-end;align-items: center;}+}++tag {+ padding: 2px 4px;+ border-radius: 6px;+ margin-right: 5px;+ margin-bottom: 5px;+ font-size: 0.8em;+}++.columns {+ display: flex;+ flex-direction: row;}\ No newline at end of filediff --git a/frontend/styles/markdown.scss b/frontend/styles/markdown.scssindex be365358..42712350 100644--- a/frontend/styles/markdown.scss+++ b/frontend/styles/markdown.scss@@ -129,38 +129,44 @@ pink {vertical-align: middle;}-.grey {+.grey,+[grey] {border-color: var(--grey-border);color: var(--grey);background-color: var(--grey-bg);}-.blue {+.blue,+[blue] {border-color: var(--blue-border);color: var(--blue);background-color: var(--blue-bg);}-.green {+.green,+[green] {border-color: var(--green-border);color: var(--green);background-color: var(--green-bg);}-.turquoise {+.turquoise,+[turquoise] {border-color: var(--turquoise-border);color: var(--turquoise);background-color: var(--turquoise-bg);}-.yellow {+.yellow,+[yellow] {border-color: var(--yellow-border);color: var(--yellow);background-color: var(--yellow-bg);}-.red {+.red,+[red] {border-color: var(--red-border);color: var(--red);background-color: var(--red-bg);@@ -216,12 +222,4 @@ pink {.custom-block a:hover {opacity: 0.6;-}--.tag {- padding: 2px 5px;- border-radius: 6px;- margin-right: 5px;- margin-bottom: 5px;- font-size: 12px;}\ No newline at end of file