From e739c7cf8c5da5121f1a9d0302f168050cc6ad1c Mon Sep 17 00:00:00 2001 From: biosias Date: Sat, 12 Sep 2026 15:28:35 +0200 Subject: [PATCH] Move marked.min.js into its own vendor/ folder (AI) Third-party code is now kept separate from the app's own js/ modules. Updated js/config.js's MARKED_URL to the new sibling-directory path (../vendor/marked.min.js) and the README's project structure diagram accordingly. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01AXSVPS3UmmASiiprPfcnUd --- README.md | 3 ++- js/config.js | 5 +++-- {js => vendor}/marked.min.js | 0 3 files changed, 5 insertions(+), 3 deletions(-) rename {js => vendor}/marked.min.js (100%) diff --git a/README.md b/README.md index 69b760c..ef56f52 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,6 @@ from the library — not something an embedding page needs to bring along. │ ├── toc.css # Auto-generated table of contents │ └── author-profile.css # Author profile card (avatar, bio, social links) ├── js/ -│ ├── marked.min.js # marked.js (local copy, loaded as a global) │ ├── config.js # BASE_URL, MARKED_URL (all via import.meta.url) │ ├── frontmatter.js # parseFrontmatter() — pure YAML-front parser │ ├── templates.js # loadTemplates(), templates cache @@ -68,6 +67,8 @@ from the library — not something an embedding page needs to bring along. │ ├── i18n.js # t(), loadStrings(), getLocale() — UI string lookup │ ├── views.js # loadArticleList, loadArticle, loadAuthorView, loadCategoryView, loadSearch │ └── router.js # Hash router and app entry point +├── vendor/ +│ └── marked.min.js # marked.js (local copy, loaded as a global) — the only 3rd-party code ├── strings/ │ ├── en.json # UI strings (default/fallback locale) — see "Translations" below │ ├── cs.json # Czech translation diff --git a/js/config.js b/js/config.js index 00824f9..7ba95bc 100644 --- a/js/config.js +++ b/js/config.js @@ -5,5 +5,6 @@ // here, one level up from this file (e.g. https://example.com/). export const BASE_URL = new URL('../', import.meta.url).href; -// Path to the marked.js vendor script (bundled alongside this file) -export const MARKED_URL = new URL('marked.min.js', import.meta.url).href; +// Path to the marked.js vendor script — lives in vendor/, a sibling of this +// file's own js/ directory, not alongside the app's own modules. +export const MARKED_URL = new URL('../vendor/marked.min.js', import.meta.url).href; diff --git a/js/marked.min.js b/vendor/marked.min.js similarity index 100% rename from js/marked.min.js rename to vendor/marked.min.js