mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 08:07:26 +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
|
@ -28,6 +28,7 @@ class DocsLayout extends React.Component {
|
|||
this.props.metadata.localized_id
|
||||
] || this.props.metadata.title
|
||||
: this.props.metadata.title;
|
||||
const extension = this.props.config.cleanUrl ? '' : '.html';
|
||||
return (
|
||||
<Site
|
||||
config={this.props.config}
|
||||
|
@ -54,7 +55,7 @@ class DocsLayout extends React.Component {
|
|||
{metadata.previous_id && (
|
||||
<a
|
||||
className="docs-prev button"
|
||||
href={metadata.previous_id + '.html'}>
|
||||
href={metadata.previous_id + extension}>
|
||||
←{' '}
|
||||
{i18n
|
||||
? translation[this.props.metadata.language][
|
||||
|
@ -70,7 +71,7 @@ class DocsLayout extends React.Component {
|
|||
{metadata.next_id && (
|
||||
<a
|
||||
className="docs-next button"
|
||||
href={metadata.next_id + '.html'}>
|
||||
href={metadata.next_id + extension}>
|
||||
{i18n
|
||||
? translation[this.props.metadata.language][
|
||||
'localized-strings'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue