Skip to content

feat: inject latest QuickFIX/J release version dynamically at build time#51

Open
Copilot wants to merge 3 commits into
mainfrom
copilot/check-old-version-mentions
Open

feat: inject latest QuickFIX/J release version dynamically at build time#51
Copilot wants to merge 3 commits into
mainfrom
copilot/check-old-version-mentions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

Version strings (3.0.0) were hardcoded across the homepage and docs, requiring manual updates on every release.

How it works

  • docusaurus.config.ts — converted to async function createConfig(). Fetches https://api.github.com/repos/quickfix-j/quickfixj/releases/latest at build time, strips the v prefix, falls back to 3.0.0 on any network/API failure. Exposed via customFields.quickfixjVersion and passed into a remark plugin.

  • Remark plugin (inline in config) — walks the markdown AST at build time and replaces {{QUICKFIXJ_VERSION}} in text, inlineCode, and code nodes. No new dependencies.

  • src/pages/index.tsxQuickStartSection reads siteConfig.customFields.quickfixjVersion via useDocusaurusContext().

  • docs/overview.md, docs/examples.md — hardcoded versions replaced with the {{QUICKFIXJ_VERSION}} placeholder.

Placeholder usage

Editors write the version naturally in markdown:

<dependency>
    <artifactId>quickfixj-core</artifactId>
    <version>{{QUICKFIXJ_VERSION}}</version>
</dependency>

The remark plugin resolves it to the current release at build time.

@chrjohn chrjohn marked this pull request as ready for review May 13, 2026 19:23
@chrjohn chrjohn closed this May 13, 2026
@chrjohn chrjohn reopened this May 13, 2026
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