Skip to content

Generate documentation#6

Merged
abrulic merged 82 commits intomainfrom
generate-documentation
Sep 3, 2025
Merged

Generate documentation#6
abrulic merged 82 commits intomainfrom
generate-documentation

Conversation

@abrulic
Copy link
Copy Markdown
Collaborator

@abrulic abrulic commented Aug 12, 2025

Fixes: #7

Description:

  • build-documentation.yml that runs automatically on every release on main branch
  • docs.build.ts script that reads from --versions flag from the command and generates documentation per version in the output folder napmed generated-docs, if --versions doesn't exists because repo doesn't have any tags, it will fallback to content form the main branch or current working directory during the local development

From https://github.com/forge-42/docs-template-example:
recording-2025-08-21-15-35-13.webm

@abrulic abrulic marked this pull request as ready for review September 1, 2025 08:25
getLatestVersion: () => "v1.0.0",
isKnownVersion: (v?: string) => v === "v1.0.0",
// not used here, but we will keeping for consistency
hrefForHomepage: (v: string) => (v === "v1.0.0" ? "/home" : `/${v}/home`),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

you can use ...await vi.importActual("module") to use the real modules IF needed, if not just don't mock it, no need

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

// biome-ignore lint/suspicious/noExplicitAny: we can use any in tests
const result = buildBreadcrumb(items as any, "/v1/started/unknown")
// biome-ignore lint/suspicious/noExplicitAny: we can use `any` here
const result = buildBreadcrumb(items as any, "/v1.0.0/getting-started/unknown")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why do you use any here? just because it's a test doesn't mean we should use any to get around typescript, if it's to avoid crazy nested subproperties with a lot of fields it can be done but if it's just to save 5 minutes you shouldn't do that

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

updated

@abrulic abrulic marked this pull request as draft September 2, 2025 10:03
@abrulic abrulic marked this pull request as ready for review September 2, 2025 11:13
@abrulic abrulic requested a review from thomasfr September 2, 2025 11:34
Copy link
Copy Markdown

@thomasfr thomasfr left a comment

Choose a reason for hiding this comment

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

Looks good so far. Thanks!

@abrulic abrulic merged commit 65c0d00 into main Sep 3, 2025
4 checks passed
@abrulic abrulic deleted the generate-documentation branch September 24, 2025 09:45
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.

generate docs for versions

3 participants