Skip to content

Conversation

@wassfila
Copy link
Member

fully functional Markdown sqlite db rendering

@wassfila wassfila requested a review from Copilot November 27, 2025 19:05
Copilot finished reviewing on behalf of wassfila November 27, 2025 19:06
Copy link

Copilot AI left a 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)
Copy link

Copilot AI Nov 27, 2025

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.

Copilot uses AI. Check for mistakes.
return filenameWithExtension.substring(0, extensionIndex);
}

async function yaml_to_grid_images(code,dirpath){
Copy link

Copilot AI Nov 27, 2025

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.

Copilot uses AI. Check for mistakes.
return {spanWidth,spanHeight}
}

function add_spanSize(imageUrls){
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused function add_spanSize.

Copilot uses AI. Check for mistakes.
//https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animate
//calcMode [discrete | linear | paced | spline]

function anim_radius(id,max){
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused function anim_radius.

Copilot uses AI. Check for mistakes.
freeMode: true,
watchSlidesProgress: true,
});
const main_swiper = new Swiper(".main", {
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable main_swiper.

Copilot uses AI. Check for mistakes.
}

function toc_menu_activation(){
const toc_menu = document.getElementsByClassName("toc_menu")[0]
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable toc_menu.

Copilot uses AI. Check for mistakes.
.all();
}

function belongsToSection(doc, section) {
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused function belongsToSection.

Copilot uses AI. Check for mistakes.
return doc.url === section || doc.url.startsWith(`${section}/`);
}

function findParentUrl(url, section) {
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused function findParentUrl.

Copilot uses AI. Check for mistakes.
return {items: renderItems, headings};
}

function getEntryDeprecated(match) {
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused function getEntryDeprecated.

Copilot uses AI. Check for mistakes.
element.items = [];
element.parent = true;
element.expanded = true;
if (is_toc) {
Copy link

Copilot AI Nov 27, 2025

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants