Skip to content
This repository was archived by the owner on Sep 7, 2020. It is now read-only.
This repository was archived by the owner on Sep 7, 2020. It is now read-only.

[plugin-rss-feed] Permalinks don't match posts' routes. #1257

@jcayzac

Description

@jcayzac

My permalinks don't match the routes I've defined (the rest works fine, only the RSS feed is affected).

phenomic.config.js

module.exports = {
  content: {
    pages: { root: 'content', globs: ['*.md'] },
    posts: { root: 'content/posts', globs: ['**/*.md'] },
  },
  plugins: [
    ['@phenomic/plugin-rss-feed', { feeds: { query: { path: 'posts', limit: 20 } } }
  ]
}

Routes

Link to a blog post is e.g. /first-post (without any trailing slash or any other path component).

<Router history={browserHistory}>
  <Route path="/about" component={Page} />
  <Route path="/" component={Page} />
  <Route path="/404.html" component={PageError} />

  <Route path="/p:after" component={PageBlog} />
  <Route path="/*" component={PageBlogPost} />
</Router>

Permalinks in the generated feed

The generated RSS link for the blog post mentioned above is /posts/first-post/ (instead of /first-post).

<item>
  <title>
    <![CDATA[ This is a first post ]]>
  </title>
  <link>http://localhost:5000/posts/first-post/</link>
  <guid isPermaLink="true">http://localhost:5000/posts/first-post/</guid>
  <pubDate>Sun, 01 Jan 2017 00:00:00 GMT</pubDate>
</item>

I think it mistakenly uses the query domain instead of the route 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions