https://github.com/brycerussell/example-theme-with-collection
Example of a `astro-theme-provider` theme with a dynamic page using contnet collections
https://github.com/brycerussell/example-theme-with-collection
Last synced: 10 months ago
JSON representation
Example of a `astro-theme-provider` theme with a dynamic page using contnet collections
- Host: GitHub
- URL: https://github.com/brycerussell/example-theme-with-collection
- Owner: BryceRussell
- Created: 2024-03-21T18:28:52.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-21T18:33:03.000Z (about 2 years ago)
- Last Synced: 2025-02-10T07:13:58.504Z (over 1 year ago)
- Language: TypeScript
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example of Theme with Content Collections
### How
1. Theme provides a dynamic route `/[...slug].astro` that creates routes using the `blog` Content Collection
2. User adds content to Collection (in this case `/playground/src/content/blog` for testing) and the markdown files are turned into pages
- [Dynamic `[...slug].astro` route](https://github.com/BryceRussell/example-theme-with-collection/blob/main/package/src/pages/%5B...slug%5D.astro)
- [User defined content/pages using markdown](https://github.com/BryceRussell/example-theme-with-collection/tree/main/playground/src/content/blog)