mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 00:57:53 +02:00
Enable clean / extension-less url (#677)
This commit is contained in:
parent
aee255219b
commit
31f0c27f81
14 changed files with 124 additions and 50 deletions
|
@ -11,6 +11,7 @@ const Container = require('./Container.js');
|
|||
const MetadataBlog = require('./MetadataBlog.js');
|
||||
const React = require('react');
|
||||
const Site = require('./Site.js');
|
||||
const utils = require('./utils.js');
|
||||
|
||||
// used to generate entire blog pages, i.e. collection of truncated blog posts
|
||||
class BlogPageLayout extends React.Component {
|
||||
|
@ -45,7 +46,10 @@ class BlogPageLayout extends React.Component {
|
|||
post={post}
|
||||
content={post.content}
|
||||
truncate={true}
|
||||
key={post.path + post.title}
|
||||
key={
|
||||
utils.getPath(post.path, this.props.config.cleanUrl) +
|
||||
post.title
|
||||
}
|
||||
config={this.props.config}
|
||||
/>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue