From 3420f1893fc4f01927a472f02158fcdbce89e531 Mon Sep 17 00:00:00 2001 From: BearToCode Date: Sun, 19 Nov 2023 19:56:06 +0100 Subject: [PATCH 01/79] ci: fix wrong gh-pages dir --- .github/workflows/gh-pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 7425634..ad310ac 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -33,4 +33,4 @@ jobs: uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./demo/build + publish_dir: ./docs/build From e3200b93a38bdb49545c9791423d6c0d787359ab Mon Sep 17 00:00:00 2001 From: BearToCode Date: Sun, 19 Nov 2023 20:01:57 +0100 Subject: [PATCH 02/79] docs: fix wrong urls --- docs/src/lib/components/sidebar/SidebarLink.svelte | 3 ++- docs/src/routes/+layout.svelte | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/src/lib/components/sidebar/SidebarLink.svelte b/docs/src/lib/components/sidebar/SidebarLink.svelte index f573a58..69762d7 100644 --- a/docs/src/lib/components/sidebar/SidebarLink.svelte +++ b/docs/src/lib/components/sidebar/SidebarLink.svelte @@ -1,4 +1,5 @@ @@ -12,7 +13,7 @@
From fd189175cdb0b476b115611a69938ce214950fbf Mon Sep 17 00:00:00 2001 From: BearToCode Date: Sun, 19 Nov 2023 20:06:05 +0100 Subject: [PATCH 03/79] docs: fix wrong search urls --- docs/src/lib/components/navbar/Search.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/src/lib/components/navbar/Search.svelte b/docs/src/lib/components/navbar/Search.svelte index 86e2bb2..fb312da 100644 --- a/docs/src/lib/components/navbar/Search.svelte +++ b/docs/src/lib/components/navbar/Search.svelte @@ -10,6 +10,7 @@ } from '$lib/search'; import { onMount } from 'svelte'; import { goto } from '$app/navigation'; + import { base } from '$app/paths'; export { className as class }; @@ -82,7 +83,7 @@ { if (result.match?.heading) goto(`/${result.path}#${result.match.heading.id}`); - else goto(`/${result.path}`); + else goto(`${base}/${result.path}`); open = false; }} class="group" From d2e82deadd265670bb8e1d969e9974ea20f0110e Mon Sep 17 00:00:00 2001 From: BearToCode Date: Sun, 19 Nov 2023 20:09:40 +0100 Subject: [PATCH 04/79] docs: fix wrong search urls --- docs/src/lib/components/navbar/Search.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/lib/components/navbar/Search.svelte b/docs/src/lib/components/navbar/Search.svelte index fb312da..e2c4462 100644 --- a/docs/src/lib/components/navbar/Search.svelte +++ b/docs/src/lib/components/navbar/Search.svelte @@ -82,7 +82,7 @@ {#each results as result} { - if (result.match?.heading) goto(`/${result.path}#${result.match.heading.id}`); + if (result.match?.heading) goto(`${base}/${result.path}#${result.match.heading.id}`); else goto(`${base}/${result.path}`); open = false; }} From 32a9862c4cd54de5d854d5eaaabb2d19ce8743d9 Mon Sep 17 00:00:00 2001 From: BearToCode Date: Sun, 19 Nov 2023 20:13:11 +0100 Subject: [PATCH 05/79] docs: change content order --- docs/src/pages/plugins/code.svelte.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/src/pages/plugins/code.svelte.md b/docs/src/pages/plugins/code.svelte.md index 7d089da..1462531 100644 --- a/docs/src/pages/plugins/code.svelte.md +++ b/docs/src/pages/plugins/code.svelte.md @@ -8,6 +8,7 @@ title: Code This plugin adds support for code blocks **syntax highlighting**. +This is done using [Speed-highlight JS](https://github.com/speed-highlight/core), which supports dynamic imports. This way, languages definitions are only imported at the moment of need. ## Installation @@ -19,8 +20,6 @@ npm i @cartamd/plugin-code -This is done using [Speed-highlight JS](https://github.com/speed-highlight/core), which supports dynamic imports. This way, languages definitions are only imported at the moment of need. - ## Setup ### Styles From 345c98727334fe8b939752940e46b86a09892f15 Mon Sep 17 00:00:00 2001 From: BearToCode Date: Sun, 19 Nov 2023 23:54:39 +0100 Subject: [PATCH 06/79] docs: fix href --- docs/src/routes/+page.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/src/routes/+page.svelte b/docs/src/routes/+page.svelte index b5fbaae..ac2153e 100644 --- a/docs/src/routes/+page.svelte +++ b/docs/src/routes/+page.svelte @@ -1,8 +1,9 @@ From 0bef4b8d37ca1c4371774d70f49ba9d530b699d1 Mon Sep 17 00:00:00 2001 From: BearToCode Date: Sun, 19 Nov 2023 23:55:56 +0100 Subject: [PATCH 07/79] docs: add links to images --- README.md | 4 +++- packages/carta-md/README.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a7e6442..c5f88ab 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,9 @@
- banner + + banner +

diff --git a/packages/carta-md/README.md b/packages/carta-md/README.md index 8b68dab..eb308dc 100644 --- a/packages/carta-md/README.md +++ b/packages/carta-md/README.md @@ -14,7 +14,9 @@
- banner + + banner +

From 7bdd027b0a6e6c93be386585d80dc42041f3110b Mon Sep 17 00:00:00 2001 From: BearToCode Date: Wed, 29 Nov 2023 22:30:45 +0100 Subject: [PATCH 08/79] docs: update old links in readme --- README.md | 2 +- packages/carta-md/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c5f88ab..2349b1e 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ # Introduction -Carta is a **lightweight**, **fast** and **extensible** Svelte Markdown editor and viewer, based on [Marked](https://github.com/markedjs/marked). Check out the [demo](http://beartocode.github.io/carta/) to see it in action. +Carta is a **lightweight**, **fast** and **extensible** Svelte Markdown editor and viewer, based on [Marked](https://github.com/markedjs/marked). Check out the [examples](http://beartocode.github.io/carta/examples) to see it in action. Differently from most editors, Carta includes neither ProseMirror nor CodeMirror, allowing for an extremely small bundle size and fast loading time. ## Features diff --git a/packages/carta-md/README.md b/packages/carta-md/README.md index eb308dc..aadc55b 100644 --- a/packages/carta-md/README.md +++ b/packages/carta-md/README.md @@ -34,7 +34,7 @@ # Introduction -Carta is a **lightweight**, **fast** and **extensible** Svelte Markdown editor and viewer, based on [Marked](https://github.com/markedjs/marked). Check out the [demo](http://beartocode.github.io/carta/) to see it in action. +Carta is a **lightweight**, **fast** and **extensible** Svelte Markdown editor and viewer, based on [Marked](https://github.com/markedjs/marked). Check out the [examples](http://beartocode.github.io/carta/examples) to see it in action. Differently from most editors, Carta includes neither ProseMirror nor CodeMirror, allowing for an extremely small bundle size and fast loading time. ## Features From c9002efa7e0a1f7e78674f6e116ed5180f9c88c8 Mon Sep 17 00:00:00 2001 From: Davide <47280851+BearToCode@users.noreply.github.com> Date: Sat, 2 Dec 2023 21:44:59 +0100 Subject: [PATCH 09/79] docs: use custom warning box --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2349b1e..e8ea005 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Differently from most editors, Carta includes neither ProseMirror nor CodeMirror # Getting started -> **Warning** +> [!WARNING] > Sanitization is not dealt with by Carta. You need to provide a `sanitizer` in the options. > Common sanitizers are [isomorphic-dompurify](https://www.npmjs.com/package/isomorphic-dompurify) (suggested) and [sanitize-html](https://www.npmjs.com/package/sanitize-html). From f7f49a513ad4edcd76930fafe455c2af673904fd Mon Sep 17 00:00:00 2001 From: Christopher Carson Date: Fri, 8 Dec 2023 10:35:51 -0600 Subject: [PATCH 10/79] added type="button" to the tab buttons --- packages/carta-md/src/lib/CartaEditor.svelte | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/carta-md/src/lib/CartaEditor.svelte b/packages/carta-md/src/lib/CartaEditor.svelte index 9595047..4984d7d 100644 --- a/packages/carta-md/src/lib/CartaEditor.svelte +++ b/packages/carta-md/src/lib/CartaEditor.svelte @@ -93,12 +93,14 @@
{#if windowMode == 'tabs'}