Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
945bdaa
initial porting from astro-big-doc sqlite branch
wassfila Nov 23, 2025
3849b15
bump content structure for gallery support
wassfila Nov 23, 2025
f1706ab
remove unused getDocuments function and redirect API
wassfila Nov 23, 2025
e5a880f
add asset handling and normalization functions; replace old asset rou…
wassfila Nov 23, 2025
e685b51
refactor: implement diagram rendering in new cmd and adapt support of…
wassfila Nov 23, 2025
9979cae
gallery treats svg as images
wassfila Nov 23, 2025
4bd9c9d
refactoring rendering to really take the table items
wassfila Nov 24, 2025
6d17760
reactivated tables
wassfila Nov 25, 2025
7a48d8b
adapted headings to toc transformation
wassfila Nov 25, 2025
c769acd
functional code and Code model viewer
wassfila Nov 25, 2025
bdeba76
gallery functional
wassfila Nov 26, 2025
2ae0e19
refactor: streamline link handling and remove unused tag component
wassfila Nov 26, 2025
4533932
feat: add support for 'puml' file extension and update README notes
wassfila Nov 27, 2025
2e1ca3c
added file_diagram generation
wassfila Nov 27, 2025
eaf1b6d
Fix appbar and menu
wassfila Nov 27, 2025
5b8c6ae
fixed left menu showing current section only
wassfila Nov 27, 2025
9e9a753
refactor: remove debug log from getEntry function
wassfila Nov 27, 2025
954a453
set content structure to npm version
wassfila Nov 27, 2025
06a226e
cleanup unused code
wassfila Nov 29, 2025
b22352e
finish cleanup
wassfila Nov 29, 2025
9b4cff4
feat: add depth controls and dynamic submenu rendering
wassfila Nov 29, 2025
97c6337
fix: add accent color to depth slider range input
wassfila Nov 29, 2025
bd26828
menu only if level higher than one
wassfila Nov 29, 2025
3ab801c
fixed menu behavior
wassfila Nov 29, 2025
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
22 changes: 22 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { defineConfig } from 'astro/config';
import node from '@astrojs/node';
import {config} from './config.js'
import yaml from '@rollup/plugin-yaml';

export default defineConfig({
adapter: node({
mode: 'middleware',
}),
output: "server",
outDir: config.outDir,
trailingSlash: 'ignore',
vite: {
plugins: [yaml()],
ssr: {
external: ['better-sqlite3']
},
optimizeDeps: {
exclude: ['better-sqlite3']
}
}
});
13 changes: 2 additions & 11 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import * as dotenv from 'dotenv'
import {join} from 'path'
import { fileURLToPath } from "node:url";
import path from "node:path";
import fsp from "node:fs/promises";
import yaml from "js-yaml";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const ROOT_DIR = path.resolve(__dirname);

async function loadManifest() {
const manifestPath = path.join(ROOT_DIR, "manifest.yaml");
const manifestPath = path.join(process.cwd(), "manifest.yaml");
const raw = await fsp.readFile(manifestPath, "utf8");
return yaml.load(raw);
}
Expand All @@ -34,12 +29,8 @@ const config = {
code_path: `${rootdir}/${outdir}/codes`,
kroki_server: kroki_server,
client_menu:true,
highlighter:{
theme:"dark-plus",
langs:['javascript','js','python','yaml']
},
highlighter:manifest.render.highlighter,
copy_assets:false,
copy_assets_dir: "_astro",
assets_hash_dir:true, //N.A. if(copy_assets == false)
fetch: manifest.fetch
}
Expand Down
6 changes: 5 additions & 1 deletion manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ fetch:
dest: content
collect:
folder_single_doc: false
file_link_ext: ["svg","webp","png","jpeg","jpg","xlsx","glb"]
file_link_ext: ["svg","webp","png","jpeg","jpg","xlsx","glb","puml"]
file_compress_ext: ['txt','md','json','csv','tsv','yaml','yml']
external_storage_kb: 512
inline_compression_kb: 32
render:
highlighter:
theme: dark-plus
langs: ['javascript','js','python','yaml']
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@
"astro": "astro",
"fetch": "node scripts/fetch.js",
"server": "node server/server.js",
"collect": "node scripts/collect.js"
"collect": "node scripts/collect.js",
"diagrams": "node scripts/diagrams.js"
},
"dependencies": {
"@astrojs/node": "^9.5.1",
"@google/model-viewer": "^4.1.0",
"@octokit/rest": "^21.0.2",
"@svgdotjs/svg.js": "^3.2.4",
"adm-zip": "^0.5.16",
"astro": "^5.0.3",
"content-structure": "2.0.1",
"better-sqlite3": "^12.4.1",
"astro": "^5.16.0",
"content-structure": "^2.1.0",
"cookie-parser": "^1.4.7",
"cors": "^2.8.5",
"datatables.net-dt": "^1.13.7",
Expand All @@ -39,7 +42,6 @@
"remark": "^15.0.1",
"sharp": "^0.33.5",
"shiki": "^3.15.0",
"swiper": "^11.1.15",
"three": "^0.172.0",
"unist-util-visit": "^5.0.0",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
Expand Down
104 changes: 94 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/favicon.ico
Binary file not shown.
21 changes: 21 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,24 @@ True content based ISR (Incremental Static Regenration) with cache warmup.
- `folders` pulls those subfolders and flattens their contents into `dest`; omit `folders` to copy the whole repo. `dest` defaults to the repo name and is cleared before copying.
- Set `GITHUB_TOKEN` to avoid GitHub rate limits.
- Run `pnpm fetch` (or `node scripts/fetch.js`) after installing dependencies.

## collection
- All configs are optional and have defaults
- Configure `collect` in `manifest.yaml`. Example:
```yaml
collect:
folder_single_doc: false
file_link_ext: ["svg","webp","png","jpeg","jpg","xlsx","glb"]
file_compress_ext: ['txt','md','json','csv','tsv','yaml','yml']
external_storage_kb: 512
inline_compression_kb: 32
```
- `folder_single_doc` default is false for one document per file, when true, generates one document per folder merging its markdown files.
- `file_link_ext` : only these extensions will be considered as assets to manage
- `file_compress_ext` : files subject to compressions in blobs storage
- `external_storage_kb` : threshold to manage blobs in folders and not in db
- `inline_compression_kb` : threshold above which db blobs get compressed
- Run `pnpm collect` to parse the `.content` directory Markdown and referenced assets and store them in `.structure/structure.db`

# Notes
* XLSX files support dropped but could potentially generate two assets, original file for download and asset table for direct asset vieweing
Loading