diff --git a/.gitignore b/.gitignore index 90f9f23..6a1dbe8 100644 --- a/.gitignore +++ b/.gitignore @@ -92,3 +92,4 @@ sw.* .vercel .turbo .output +.data diff --git a/apps/web/app/assets/css/nuxt-content.css b/apps/web/app/assets/css/nuxt-content.css index 1629b66..ecf2e1e 100644 --- a/apps/web/app/assets/css/nuxt-content.css +++ b/apps/web/app/assets/css/nuxt-content.css @@ -52,7 +52,7 @@ } } - pre { + .shiki { @apply p-4 mt-5 mb-6 bg-neutral-200 dark:bg-neutral-800 border border-neutral-300 dark:border-neutral-700 rounded-lg overflow-hidden hover:overflow-auto; } diff --git a/apps/web/app/components/ContentLinks.vue b/apps/web/app/components/ContentLinks.vue index a2283b0..9a7de2b 100644 --- a/apps/web/app/components/ContentLinks.vue +++ b/apps/web/app/components/ContentLinks.vue @@ -54,6 +54,6 @@ const { mod } = useDocsMetadata(); const editURL = computed( () => - `https://github.com/blakesmods/web/edit/main/apps/web/content${props.page._path}.${props.page._extension}` + `https://github.com/blakesmods/web/edit/main/apps/web/content${props.page.path}.${props.page.extension}` ); diff --git a/apps/web/app/components/content/ProseCode.vue b/apps/web/app/components/content/ProseCode.vue deleted file mode 100644 index 2bf3b98..0000000 --- a/apps/web/app/components/content/ProseCode.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - diff --git a/apps/web/app/components/docs/Pagination.vue b/apps/web/app/components/docs/Pagination.vue index ce69965..c314fb6 100644 --- a/apps/web/app/components/docs/Pagination.vue +++ b/apps/web/app/components/docs/Pagination.vue @@ -5,7 +5,7 @@ > queryContent(parts[0], parts[1]).findSurround(props.current._path) + "docs/" + props.current.path + "/pagination", + () => queryCollectionItemSurroundings("docs", props.current.path) ); const previous = computed(() => data.value[0]); @@ -57,22 +55,19 @@ const next = computed(() => data.value[1]); // the latest version doesn't have the version in the url if (isLatestVersion.value) { if (previous.value) { - previous.value._path = removeDocsVersionFromPath( - previous.value._path, + previous.value.path = removeDocsVersionFromPath( + previous.value.path, version.value ); } if (next.value) { - next.value._path = removeDocsVersionFromPath( - next.value._path, - version.value - ); + next.value.path = removeDocsVersionFromPath(next.value.path, version.value); } } function formatModName(document) { - const modID = document._path.split("/")[isLatestVersion.value ? 2 : 3]; + const modID = document.path.split("/")[isLatestVersion.value ? 2 : 3]; const mod = getMod(modID); return mod ? mod.name : modID; } diff --git a/apps/web/app/components/docs/SidebarContent.vue b/apps/web/app/components/docs/SidebarContent.vue index 83f4270..9e575c5 100644 --- a/apps/web/app/components/docs/SidebarContent.vue +++ b/apps/web/app/components/docs/SidebarContent.vue @@ -39,10 +39,10 @@ v-for="document in documents[category]" class="relative pl-2 py-0.5 text-sm first:mt-2 hover:text-dimmed border-l border-neutral-300 dark:border-neutral-700" :class="{ - '!text-primary-500 dark:!text-primary-400 font-semibold': - document._path === route.path + 'text-primary-500! dark:text-primary-400! font-semibold': + document.path === route.path }" - :to="document._path" + :to="document.path" > {{ document.title }} diff --git a/apps/web/app/components/global/DocsSectionList.vue b/apps/web/app/components/global/DocsSectionList.vue index cefeb4b..856dd3b 100644 --- a/apps/web/app/components/global/DocsSectionList.vue +++ b/apps/web/app/components/global/DocsSectionList.vue @@ -4,7 +4,7 @@ {{ page.title }} @@ -17,15 +17,16 @@ const { version, mod, isLatestVersion } = useDocsMetadata(); const { data } = await useAsyncData( `${mod.value?.mod_id}-${version.value}-docs-listing`, () => - queryContent("docs", version.value, mod.value?.mod_id ?? "") - .only(["title", "_path"]) - .find() + queryCollection("docs") + .where("path", "LIKE", createDocsPathSQL(version.value, mod.value.mod_id)) + .select("title", "path") + .all() ); const pages = computed(() => data.value.slice(1).map(doc => { - if (isLatestVersion.value && doc._path) { - doc._path = removeDocsVersionFromPath(doc._path, version.value); + if (isLatestVersion.value && doc.path) { + doc.path = removeDocsVersionFromPath(doc.path, version.value); } return doc; diff --git a/apps/web/app/components/wiki/ArticleLink.vue b/apps/web/app/components/wiki/ArticleLink.vue index 5cb8f7f..035663e 100644 --- a/apps/web/app/components/wiki/ArticleLink.vue +++ b/apps/web/app/components/wiki/ArticleLink.vue @@ -1,7 +1,7 @@