Feature: Produce content files list as a static asset

This issue has been tracked since 2023-02-23.

Which scope/s are relevant/related to the feature request?

content

Information

Currently, Analog uses Vite's import.meta.glob to get the list of content files with their frontmatter as an array of objects. The side effects of this is that it gets loaded into the main bundle and can cause the size of the app to increase as you add more content.

This change would generate the file as a static asset that can be loaded with a fetch call, and decouple it from the main bundle.

When using injectContentFiles it would fetch this file and return its contents.

Describe any alternatives/workarounds you're currently using

Move the provideContent(withMarkdownRenderer()) to a lazy loaded route.

I would be willing to submit a PR to fix this issue

  • Yes
  • No
More Details About Repo
Owner Name analogjs
Repo Name analog
Full Name analogjs/analog
Language TypeScript
Created Date 2022-07-06
Updated Date 2023-03-28
Star Count 885
Watcher Count 18
Fork Count 67
Issue Count 33

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date