Skip to main content

Blog feeds and authoring checks

Quick reference

  • RSS + Atom feeds are generated (feedOptions), with xslt: true so opening the raw feed URL in a browser shows a formatted page instead of raw XML.
  • onInlineTags / onInlineAuthors / onUntruncatedBlogPosts are all set to 'warn' — none are set at all in the template (they default to off).
  • blogSidebarCount: 'ALL' is required by the blog post series sidebar feature — don't remove it.
  • postsPerPage: 'ALL' is required by blog index list filtering — don't remove it. The actual per-page post count shown to visitors now lives in src/theme/BlogListPage/index.js (POSTS_PER_PAGE), not here.

Feed generation​

docusaurus.config.js
presets: [['classic', {
blog: {
feedOptions: {
type: ['rss', 'atom'],
xslt: true,
},
},
}]],

The classic template ships with no feedOptions at all, so no feed is generated by default. This produces both /blog/rss.xml and /blog/atom.xml. xslt: true attaches a stylesheet to the generated XML purely for readability if someone opens the feed URL directly in a browser instead of a feed reader — it has no effect on how feed readers consume it.

Authoring warnings​

docusaurus.config.js
blog: {
onInlineTags: 'warn',
onInlineAuthors: 'warn',
onUntruncatedBlogPosts: 'warn',
},

These only print console warnings during npm start / npm run build — none of them fail the build.

  • onInlineTags — flags a post that defines a tag inline in frontmatter (e.g. tags: [{label: "Foo", permalink: "/foo"}]) instead of referencing a tag declared once in blog/tags.yml.
  • onInlineAuthors — flags a post that defines an author inline instead of referencing one declared in blog/authors.yml.
  • onUntruncatedBlogPosts — flags a post with no <!-- truncate --> marker, meaning the full post body renders on the blog list page instead of an excerpt.

Bump any of these to 'throw' to enforce it strictly (build fails instead of warning), or 'ignore' to silence it.

Sidebar post count​

blog: {
blogSidebarCount: 'ALL',
},

The blog plugin defaults to showing only the 5 most recent posts in the sidebar. This is overridden to show every post, which is a hard requirement for the blog post series grouping — that feature reads from the full sidebar item list to sort posts into series buckets, so capping it at 5 would silently drop older posts from both the year list and their series. See that page for the full explanation.