Skip to content

Conversation

@3w36zj6
Copy link
Member

@3w36zj6 3w36zj6 commented Sep 8, 2025

cf. #233

In this pull request, the project root for SSG has been moved to /website/typst-docs-web/ in preparation for separating SSG into an independent repository. This directory will soon be replaced with a Git submodule.

@3w36zj6 3w36zj6 requested a review from Copilot September 8, 2025 07:48
@3w36zj6 3w36zj6 marked this pull request as ready for review September 8, 2025 07:48

This comment was marked as outdated.

@3w36zj6 3w36zj6 force-pushed the feature/move-ssg-root-directory branch from acdcb9b to c6236a2 Compare September 8, 2025 08:02
@3w36zj6
Copy link
Member Author

3w36zj6 commented Sep 8, 2025

Could you please do an additional review? @YDX-2147483647 @Its-Just-Nans


// Create a symbolic link to the assets generated by typst-docs in ./public/assets/
const assetsDocsPath = resolve(__dirname, "../assets/");
const assetsDocsPath = resolve(__dirname, "../../assets/");
Copy link
Contributor

@YDX-2147483647 YDX-2147483647 Sep 8, 2025

Choose a reason for hiding this comment

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

If typst-docs-web is meant to be a git submodule in the future, then I don't think ../../ is a good idea. It will be difficult to test typst-docs-web separately.

Would [Option A] something like readFile(env.TYPST_DOCS_RESULT + 'assets/') be better? Or [Option B] read from metadata.json?
Both approaches require a mechanism to specify where metadata.json is.

Copy link
Member Author

Choose a reason for hiding this comment

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

The current approach requires that the git submodule for SSG and the docs.json and assets/ directories output by typst-docs are located in the specified places.
Although using environment variables is one option, since we have a schema-based metadata JSON file, I think injecting the path through this file is a better idea.

@3w36zj6
Copy link
Member Author

3w36zj6 commented Sep 8, 2025

Ah, what should we do with --assets-dir and --out-file in mise.toml?

const assetsDocsPath = resolve(__dirname, assetsPath);
const publicAssetsDocsPath = resolve(__dirname, "./public/assets/");
rmSync(publicAssetsDocsPath, { recursive: true, force: true });
symlinkSync(assetsDocsPath, publicAssetsDocsPath, "dir");
Copy link
Contributor

@YDX-2147483647 YDX-2147483647 Sep 8, 2025

Choose a reason for hiding this comment

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

How about [Option C] letting typst-docs-web always read typst-docs-web/public/, and creating symlinks in mise.toml?

[Option C'] Also creating a symlink from metadata.json to typst-docs-web/public/metadata.json.

Copy link
Contributor

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 pull request restructures the SSG (Static Site Generator) project by moving it from /website/ to /website/typst-docs-web/ in preparation for separating it into an independent repository that will be managed as a Git submodule.

  • Moved SSG project root to /website/typst-docs-web/ subdirectory
  • Updated file paths and import statements to reflect the new directory structure
  • Modified build tasks and CI/CD workflows to use the new paths

Reviewed Changes

Copilot reviewed 12 out of 84 changed files in this pull request and generated no comments.

Show a summary per file
File Description
website/typst-docs-web/vite.config.ts Removed symbolic link creation logic that is now handled externally
website/typst-docs-web/src/utils/translationStatus.ts Updated file path to use public directory
website/typst-docs-web/src/metadata.ts Changed from direct import to dynamic file reading with fallback
website/typst-docs-web/src/index.tsx Updated import path for docs.json
website/typst-docs-web/.gitignore Added new gitignore for the SSG subdirectory
website/translation-status.json Updated schema path reference
website/metadata.json Updated schema path reference
website/.gitignore Removed old gitignore entries
package.json Updated textlint path for new directory structure
mise.toml Added symlink tasks and updated all directory references
.textlintignore Updated paths for new directory structure
.github/workflows/website.yml Updated all CI/CD paths and working directories

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@3w36zj6 3w36zj6 merged commit be042df into main Sep 17, 2025
5 checks passed
@3w36zj6 3w36zj6 deleted the feature/move-ssg-root-directory branch September 17, 2025 10:50
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.

6 participants