Skip to content

Static site publishing#11

Merged
gbro3n merged 8 commits intomainfrom
static-site-publishing
Mar 24, 2026
Merged

Static site publishing#11
gbro3n merged 8 commits intomainfrom
static-site-publishing

Conversation

@gbro3n
Copy link
Member

@gbro3n gbro3n commented Mar 24, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 24, 2026 19:04
@gbro3n gbro3n merged commit d64378d into main Mar 24, 2026
1 check passed
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

Adds first-class static site publishing to AS Notes by bundling a new publish CLI and exposing VS Code commands/slash-commands to manage front matter and run HTML builds.

Changes:

  • Introduces publish/ package (CLI + config support) and wires it into CI for docs generation.
  • Adds VS Code publish commands (toggle front matter fields, publish wizard, run publish) and builds convert.js into the extension dist.
  • Moves FrontMatterService into as-notes-common and updates consumers to import from the shared package.

Reviewed changes

Copilot reviewed 50 out of 69 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
vs-code-extension/src/extension.ts Registers new publish-related commands in full mode.
vs-code-extension/src/WikilinkRenameTracker.ts Switches FrontMatterService import to as-notes-common.
vs-code-extension/src/SlashCommandProvider.ts Adds publishing slash commands that invoke the new VS Code commands.
vs-code-extension/src/PublishService.ts New publish wizard/config discovery + command handlers to run bundled convert.js.
vs-code-extension/src/IndexService.ts Switches FrontMatterService import to as-notes-common.
vs-code-extension/src/FrontMatterService.ts Re-exports FrontMatterService from as-notes-common.
vs-code-extension/package.json Bumps extension version, broadens activation, and contributes new publish commands.
vs-code-extension/build.mjs Builds/bundles publish/src/convert.ts into vs-code-extension/dist/convert.js.
skills/as-notes-agent-use/SKILL.md Updates docs references from html-conversion to publish.
publish/test/config.test.ts Adds vitest coverage for CLI config, layouts/themes/includes, assets, base-url, etc.
publish/package.json Introduces npm package metadata and scripts for the new publisher CLI.
publish/README.md Adds minimal readme for the publish package.
html-conversion/test/FileResolver.test.ts Updates resolver tests for slugified hrefs and adds slugify tests.
html-conversion/src/convert.ts Removes the old html-conversion CLI entry point.
html-conversion/src/FileResolver.ts Adds slugify() and switches href generation to slugified names.
html-conversion/package.json Removes the old html-conversion package manifest.
html-conversion/README.md Removes outdated html-conversion readme.
docs-src/templates/Journal.md Adds a journal template placeholder header.
docs-src/pages/index.md Adds a screenshot and fixes formatting.
docs-src/pages/Publishing a Static Site.md Removes old publishing documentation page (moved).
docs-src/notes/Publishing a Static Site.md Adds comprehensive new publishing documentation (notes workspace).
docs-src/blog/welcome-to-as-notes-blog.md Adds a sample blog page for publishing.
docs-src/asnotes-publish.themes.notes/default.css Adds generated/default theme CSS for notes site config.
docs-src/asnotes-publish.themes.notes/dark.css Adds generated/dark theme CSS for notes site config.
docs-src/asnotes-publish.themes.blog/default.css Adds generated/default theme CSS for blog site config.
docs-src/asnotes-publish.themes.blog/dark.css Adds generated/dark theme CSS for blog site config.
docs-src/asnotes-publish.notes.json Adds publish config for docs “notes” site.
docs-src/asnotes-publish.layouts.notes/minimal.html Adds generated minimal layout template for notes config.
docs-src/asnotes-publish.layouts.notes/docs.html Adds generated docs layout template for notes config.
docs-src/asnotes-publish.layouts.notes/blog.html Adds generated blog layout template for notes config.
docs-src/asnotes-publish.layouts.blog/minimal.html Adds generated minimal layout template for blog config.
docs-src/asnotes-publish.layouts.blog/docs.html Adds generated docs layout template for blog config.
docs-src/asnotes-publish.layouts.blog/blog.html Adds generated blog layout template for blog config.
docs-src/asnotes-publish.includes.notes/header.html Adds generated header partial for notes config.
docs-src/asnotes-publish.includes.notes/footer.html Adds generated footer partial for notes config.
docs-src/asnotes-publish.includes.blog/header.html Adds generated header partial for blog config.
docs-src/asnotes-publish.includes.blog/footer.html Adds generated footer partial for blog config.
docs-src/asnotes-publish.blog.json Adds publish config for docs “blog” site.
docs-src/.vscode/settings.json Adds markdown copy destination settings for docs workspace.
docs-src/.gitignore Ignores .asnotes/ + .asnotesignore within docs-src.
common/test/FrontMatterService.test.ts Adds full test suite for front matter parsing/strip/update behavior.
common/src/index.ts Exports FrontMatterService from the common package entrypoint.
common/src/FrontMatterService.ts Adds shared front matter parsing implementation (publishing + aliases).
TECHNICAL.md Updates architecture docs to reflect publish/ + publish wizard/service.
README.md Updates repository/package docs and adds publish CLI usage details.
CHANGELOG.md Adds release notes entry for v2.2.8 publishing feature.
.vscode/settings.json Sets workspace rootDirectory to docs-src and markdown copy destination.
.github/workflows/ci.yml Renames html-conversion job to publish and switches docs build to use the npm CLI.
Comments suppressed due to low confidence (4)

vs-code-extension/src/PublishService.ts:1

  • pickOutputDirectory() is being called with config.outputDir passed as the inputDir parameter (2nd arg), not as the saved output directory (3rd arg). This produces incorrect default folder suggestions (derived from the output path) and skips the "reuse saved output directory" flow. Call it as pickOutputDirectory(notesRoot, config.inputDir, config.outputDir) (or at minimum pass undefined for inputDir and config.outputDir for savedDir).
    vs-code-extension/src/PublishService.ts:1
  • Same argument ordering issue as the __all__ path: selected.config.outputDir is being passed as inputDir rather than savedDir. This will lead to wrong defaults and not offering reuse of the previously saved folder. Use pickOutputDirectory(notesRoot, selected.config.inputDir, selected.config.outputDir).
    vs-code-extension/src/PublishService.ts:1
  • Boolean toggling only detects true and treats everything else as false. This means public: yes (or other YAML-boolean-like variants) will incorrectly toggle to true instead of false. Since the repo already centralizes boolean parsing in FrontMatterService (supports true/false/yes/no), re-use that parsing here (or expand the regex) so toggling inverts the actual boolean value rather than only matching /true/.
    vs-code-extension/package.json:1
  • Activating the extension on * will load it for every VS Code session (all languages/workspaces), which can increase startup/idle overhead and impact users who don't use AS Notes in that workspace. Prefer narrowing activation to explicit events (e.g., onLanguage:markdown, workspaceContains:.asnotes, and/or onCommand:... for the publish commands) so the extension only activates when needed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

--stylesheet docs.css
--asset ../docs-src/docs.css
working-directory: html-conversion
- run: npx @appsoftwareltd/asnotes-publish --config docs-src/asnotes-publish.notes.json
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

This makes CI depend on downloading the published npm package (registry availability + version alignment) rather than validating the publish/ code in the same commit. If the goal is to test the repo’s current publish implementation, build/run from publish/ in-workspace (similar to the test job) or use npx with a local path/tarball to ensure CI exercises the code being changed.

Suggested change
- run: npx @appsoftwareltd/asnotes-publish --config docs-src/asnotes-publish.notes.json
- run: npm ci
working-directory: publish
- run: npx --no-install asnotes-publish --config ../docs-src/asnotes-publish.notes.json
working-directory: publish

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