Astro Accelerator has built-in feeds for:
- Sitemap (you can submit this to search engines)
- Atom (similar to RSS)
- Search
Sitemap
The sitemap is XML and is located at /sitemap.xml
.
Atom Feed
The Atom feed is XML and should be added to any post collection folders, for example: /pages/articles/feed.xml.ts
. This allows a feed for each collection, for example, for blogs, news, events, and so on.
The main feed for your website should be added to config.ts
. This will be added to the alternative
meta tag with a content type of application/atom+xml
.
feedUrl: '/articles/feed.xml',
The feed looks for markdown files in child folders by default. You can update this within feed.xml.ts
by changing this code:
const allArticles = import.meta.glob('./**/*.md');
For example, you could place a site-wide feed that looks for markdown files in several collection folders.
See the articles naming instructions for more on customization requirements.
Site Search Feed
The site search feed is JSON and is located at /search.json
. This file is used to power the site search feature.
Customization
You can rename any of these files, for example atom.xml.ts
can be renamed feed.xml.ts
and will continue to work.