Changing package.json logic to bun with patches for unstorage and nuxt/content

This commit is contained in:
Peaceultime 2024-07-25 14:42:01 +02:00
parent 39299a268c
commit 4b901a87d7
9 changed files with 97 additions and 6 deletions

View File

@ -28,14 +28,17 @@ onMounted(() => {
<line x1="4" y1="18" x2="20" y2="18"></line> <line x1="4" y1="18" x2="20" y2="18"></line>
</svg> </svg>
</div> </div>
<NuxtLink class="site-name" aria-label="Accueil" :href="'/explorer'">Système Aspect</NuxtLink> <div class="gap-3">
<NuxtLink class="site-nav-bar-text" aria-label="Accueil" :href="'/'">Accueil</NuxtLink>
<NuxtLink class="site-nav-bar-text" aria-label="Systeme" :href="'/explorer'">Systeme</NuxtLink>
<NuxtLink class="site-nav-bar-text" aria-label="Outils" :href="'/tools'">Outils</NuxtLink>
</div>
</div> </div>
<div> <div>
<SearchView /> <SearchView />
</div> </div>
<div class="ps-1"> <div class="ps-1">
<ThemeSwitch /> <ThemeSwitch />
<Icon name="material-symbols:account-circle-outline" mode="svg" size="1.5em"/>
</div> </div>
</div> </div>
<div class="site-body"> <div class="site-body">

View File

@ -47,4 +47,28 @@
.pb-3 .pb-3
{ {
padding-bottom: 3em; padding-bottom: 3em;
}
.gap-1 > *
{
padding-left: .4em;
padding-right: .4em;
}
.gap-1 > *:first-child, .gap-2 > *:first-child, .gap-3 > *:first-child
{
padding-left: 0;
}
.gap-1 > *:last-child, .gap-2 > *:last-child, .gap-3 > *:last-child
{
padding-right: 0;
}
.gap-2 > *
{
padding-left: .8em;
padding-right: .8em;
}
.gap-3 > *
{
padding-left: 1.2em;
padding-right: 1.2em;
} }

View File

@ -44,8 +44,8 @@
--site-name-color: var(--text-normal); --site-name-color: var(--text-normal);
--site-name-color-hover: var(--text-muted); --site-name-color-hover: var(--text-muted);
--site-name-font: inherit; --site-name-font: inherit;
--site-name-size: 22px; --site-name-size: 18px;
--site-name-weight: var(--font-semibold); --site-name-weight: var(--font-medium);
--site-menu-icon-color: var(--text-faint); --site-menu-icon-color: var(--text-faint);
--site-menu-icon-color-hover: var(--text-normal); --site-menu-icon-color-hover: var(--text-normal);
--site-menu-icon-size: 24px; --site-menu-icon-size: 24px;
@ -4061,9 +4061,9 @@ body {
padding: 40px; padding: 40px;
} }
.is-readable-line-width .not-found-container { /*.is-readable-line-width .not-found-container {
max-width: var(--page-width); max-width: var(--page-width);
} }*/
.not-found-title { .not-found-title {
font-size: var(--h1-size); font-size: var(--h1-size);

BIN
bun.lockb Normal file

Binary file not shown.

11
package.json Normal file
View File

@ -0,0 +1,11 @@
{
"devDependencies": { "@nuxt/content": "^2.13.2", "@nuxtjs/color-mode": "^3.4.2", "nuxt": "^3.12.4", "vue": "^3.4.34", "vue-router": "^4.4.0" },
"patchedDependencies": {
"unstorage@1.10.2": "patches/unstorage@1.10.2.patch",
"@nuxt/content@2.13.2": "patches/@nuxt%2Fcontent@2.13.2.patch"
},
"dependencies": {
"hast-util-to-html": "^9.0.1",
"remark-breaks": "^4.0.0"
}
}

9
pages/index.vue Normal file
View File

@ -0,0 +1,9 @@
<template>
<div class="site-body-center-column">
<div class="render-container">
<div class="not-found-container">
<div class="not-found-title">:)</div>
</div>
</div>
</div>
</template>

View File

@ -0,0 +1,17 @@
diff --git a/dist/runtime/server/storage.js b/dist/runtime/server/storage.js
index b9bb602074f15488fe7ee700bbed281b42b463d9..96382bc576ab0145c854d06d67649b31138e76f4 100644
--- a/dist/runtime/server/storage.js
+++ b/dist/runtime/server/storage.js
@@ -40,10 +40,10 @@ const contentIgnorePredicate = (key) => {
if (key.startsWith("preview:") || isIgnored(key)) {
return false;
}
- if (invalidKeyCharacters.some((ik) => key.includes(ik))) {
+ /*if (invalidKeyCharacters.some((ik) => key.includes(ik))) {
console.warn(`Ignoring [${key}]. File name should not contain any of the following characters: ${invalidKeyCharacters.join(", ")}`);
return false;
- }
+ }*/
return true;
};
export const getContentsIds = async (event, prefix) => {

View File

@ -0,0 +1,26 @@
diff --git a/drivers/github.cjs b/drivers/github.cjs
index 606d742980420c0a60f991803bc1cc4604112f54..322c61f73c85aa7ccaf684d2cf64af5b20a9c579 100644
--- a/drivers/github.cjs
+++ b/drivers/github.cjs
@@ -21,7 +21,7 @@ module.exports = (0, _utils.defineDriver)(_opts => {
...defaultOptions,
..._opts
};
- const rawUrl = (0, _ufo.joinURL)(opts.cdnURL, opts.repo, opts.branch, opts.dir);
+ const rawUrl = (0, _ufo.joinURL)(opts.cdnURL, opts.repo, 'raw', 'branch', opts.branch, opts.dir);
let files = {};
let lastCheck = 0;
let syncPromise;
diff --git a/drivers/github.mjs b/drivers/github.mjs
index ae9833dfe933d3d68050ed55d7ca202c4a995d0d..2c6dfd006e5495ed2a4c2a057c7a1a8b50b5659b 100644
--- a/drivers/github.mjs
+++ b/drivers/github.mjs
@@ -12,7 +12,7 @@ const defaultOptions = {
const DRIVER_NAME = "github";
export default defineDriver((_opts) => {
const opts = { ...defaultOptions, ..._opts };
- const rawUrl = joinURL(opts.cdnURL, opts.repo, opts.branch, opts.dir);
+ const rawUrl = joinURL(opts.cdnURL, opts.repo, 'raw', 'branch', opts.branch, opts.dir);
let files = {};
let lastCheck = 0;
let syncPromise;

1
public/icons/user.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 256 256"><path fill="currentColor" d="M128 28a100 100 0 1 0 100 100A100.11 100.11 0 0 0 128 28M68.87 198.42a68 68 0 0 1 118.26 0a91.8 91.8 0 0 1-118.26 0m124.3-5.55a75.6 75.6 0 0 0-44.51-34a44 44 0 1 0-41.32 0a75.6 75.6 0 0 0-44.51 34a92 92 0 1 1 130.34 0M128 156a36 36 0 1 1 36-36a36 36 0 0 1-36 36"/></svg>

After

Width:  |  Height:  |  Size: 386 B