Skip to content

Static build#5153

Merged
myovchev merged 18 commits intomainfrom
static-build
Mar 11, 2026
Merged

Static build#5153
myovchev merged 18 commits intomainfrom
static-build

Conversation

@boutell
Copy link
Copy Markdown
Member

@boutell boutell commented Nov 11, 2025

Summary

Introduced static build support via external frontend.

BoDonkey
BoDonkey previously approved these changes Feb 19, 2026
@myovchev myovchev marked this pull request as ready for review February 24, 2026 17:04
Comment thread packages/apostrophe/test/static-build.js Dismissed
@myovchev myovchev requested a review from BoDonkey February 26, 2026 17:38
Comment thread packages/apostrophe/test/static-build.js Dismissed
Comment thread packages/sitemap/test/test.js Dismissed
Comment thread packages/sitemap/test/test.js Dismissed
Comment thread packages/sitemap/test/test.js Dismissed
Comment thread packages/sitemap/test/test.js Dismissed
Copy link
Copy Markdown
Member Author

@boutell boutell left a comment

Choose a reason for hiding this comment

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

See above for my thoughts.

Comment thread packages/apostrophe-astro/lib/aposPageFetch.js Outdated
Comment thread packages/apostrophe-astro/lib/aposPageFetch.js
Comment thread packages/apostrophe-astro/lib/format.js
Comment thread packages/apostrophe-astro/index.js
Comment thread packages/apostrophe-astro/index.js
// values are emitted into the virtual config module so that
// helpers and library code never need to re-check process.env.
resolvedAposHost = process.env.APOS_HOST || options.aposHost;
const aposPrefix = process.env.APOS_PREFIX
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

APOS_PREFIX is a VERY nice nice-to-have. I see it let you do github sites.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's currently supported on a project level, I didn't change core to apply prefix based on env.

Comment thread packages/apostrophe/modules/@apostrophecms/attachment/index.js
Comment thread packages/apostrophe/modules/@apostrophecms/attachment/index.js

dispatchAll() {
self.dispatch('/', self.indexPage);
if (self.apos.url.options.static) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

A question. This flag will be set when the dynamic editing site intended for static builds later is being edited right? It's best if URLs are built the same between the two.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

But we could temporarily live without that if we must do so in order to release this on time.

Copy link
Copy Markdown
Contributor

@myovchev myovchev Mar 9, 2026

Choose a reason for hiding this comment

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

The build can't be initiated if this flag is not set. So basically - yes, it's indirectly enforced. There will be some differences how internal URLs will be built, but the major links - pagination, filters, etc should be the same.

@myovchev myovchev merged commit d61f342 into main Mar 11, 2026
98 checks passed
@myovchev myovchev deleted the static-build branch March 11, 2026 08:07
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.

4 participants