-
-
Notifications
You must be signed in to change notification settings - Fork 0
Sql render #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Sql render #1
Conversation
deprecate pz_gallery deactivated menus for bringup
…tes with new implementations
… svg rendered diagrams in astro code components
bugfix wrong language inference on parent code blocks
functional headings and images
refactor: enhance language detection in code component and remove XLSX table component fix: improve error handling in dynamic page rendering
added directive completed all item types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a fully functional SQLite-based markdown rendering system that replaces file-based content management with a database-driven approach. The implementation enables efficient content storage, retrieval, and rendering through a structured database schema.
Key Changes:
- Implemented SQLite database integration for markdown content and assets via
structure-db.js - Added comprehensive markdown rendering pipeline with support for diagrams, tables, images, and interactive components
- Introduced server-side rendering with Astro node adapter and optional GitHub authentication
Reviewed changes
Copilot reviewed 77 out of 98 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
src/libs/structure-db.js |
Core database interface for querying documents, items, assets, and blobs from SQLite |
src/pages/index.astro, src/pages/[...url].astro |
Dynamic page rendering using database queries |
src/pages/assets/[...uid].js |
Asset serving endpoint with fallback strategies |
src/components/markdown/AstroMarkdown.astro |
Main markdown rendering component orchestrating all content types |
src/components/markdown/code/Code.astro |
Code block rendering with syntax highlighting and diagram support |
src/layout/Layout.astro, src/layout/layout_utils.js |
Page layout with navigation menus built from database |
astro.config.mjs |
Astro configuration for SSR with node adapter |
config.js |
Centralized configuration loading from manifest.yaml |
scripts/diagrams.js |
Build-time diagram generation via Kroki API |
server/server.js |
Express server for production deployment with optional auth |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| async function relAssetToUrl(relativepath,dirpath){ | ||
| if(config.copy_assets){ | ||
| return await config.base+relAssetToUrlCopy(relativepath,dirpath) |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing await. The call to 'relAssetToUrlCopy' always returns a promise.
| return filenameWithExtension.substring(0, extensionIndex); | ||
| } | ||
|
|
||
| async function yaml_to_grid_images(code,dirpath){ |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused function yaml_to_grid_images.
| return {spanWidth,spanHeight} | ||
| } | ||
|
|
||
| function add_spanSize(imageUrls){ |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused function add_spanSize.
| //https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animate | ||
| //calcMode [discrete | linear | paced | spline] | ||
|
|
||
| function anim_radius(id,max){ |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused function anim_radius.
| freeMode: true, | ||
| watchSlidesProgress: true, | ||
| }); | ||
| const main_swiper = new Swiper(".main", { |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable main_swiper.
| } | ||
|
|
||
| function toc_menu_activation(){ | ||
| const toc_menu = document.getElementsByClassName("toc_menu")[0] |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable toc_menu.
| .all(); | ||
| } | ||
|
|
||
| function belongsToSection(doc, section) { |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused function belongsToSection.
| return doc.url === section || doc.url.startsWith(`${section}/`); | ||
| } | ||
|
|
||
| function findParentUrl(url, section) { |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused function findParentUrl.
| return {items: renderItems, headings}; | ||
| } | ||
|
|
||
| function getEntryDeprecated(match) { |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused function getEntryDeprecated.
| element.items = []; | ||
| element.parent = true; | ||
| element.expanded = true; | ||
| if (is_toc) { |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This use of variable 'is_toc' always evaluates to true.
fully functional Markdown sqlite db rendering