Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"dev": "vocs dev",
"lint": "tsc --noEmit",
"build": "vocs build",
"build": "vocs build && node scripts/copy-markdown-routes.mjs",
"preview": "vocs preview"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion public/bloom-mark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions scripts/copy-markdown-routes.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { copyFile, mkdir, readdir } from 'node:fs/promises'
import { dirname, join, relative } from 'node:path'

const publicDir = join(process.cwd(), 'dist/public')
const mdDir = join(publicDir, 'assets/md')

async function* walk(dir) {
for (const entry of await readdir(dir, { withFileTypes: true })) {
const path = join(dir, entry.name)
if (entry.isDirectory()) yield* walk(path)
else if (entry.isFile() && entry.name.endsWith('.md')) yield path
}
}

for await (const source of walk(mdDir)) {
const destination = join(publicDir, relative(mdDir, source))
await mkdir(dirname(destination), { recursive: true })
await copyFile(source, destination)
}
14 changes: 14 additions & 0 deletions src/pages/_root.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Vocs already shows the header logo link below the large-screen sidebar
* breakpoint and hides it on desktop when the sidebar is present. Match that
* default/Centaur pattern; only give Bloom's square SVG mark an explicit
* mobile header size so it paints reliably in the top bar.
*/
@media (max-width: 1023.98px) {
[data-v-logo-image] {
width: 1.75rem;
height: 1.75rem;
max-height: 1.75rem;
object-fit: contain;
}
}
Loading