mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-07 21:32:38 +02:00
fix: use clean url for og:url when cleanUrl is true (#1242)
This commit is contained in:
parent
360696f269
commit
b2f3642fc6
1 changed files with 6 additions and 5 deletions
|
@ -16,7 +16,7 @@ const Footer = require(`${process.cwd()}/core/Footer.js`);
|
||||||
const translation = require('../server/translation.js');
|
const translation = require('../server/translation.js');
|
||||||
const env = require('../server/env.js');
|
const env = require('../server/env.js');
|
||||||
const liveReloadServer = require('../server/liveReloadServer.js');
|
const liveReloadServer = require('../server/liveReloadServer.js');
|
||||||
const {idx} = require('./utils.js');
|
const {idx, getPath} = require('./utils.js');
|
||||||
|
|
||||||
const CWD = process.cwd();
|
const CWD = process.cwd();
|
||||||
|
|
||||||
|
@ -41,10 +41,11 @@ class Site extends React.Component {
|
||||||
`${this.props.config.title} · ${tagline}`) ||
|
`${this.props.config.title} · ${tagline}`) ||
|
||||||
this.props.config.title;
|
this.props.config.title;
|
||||||
const description = this.props.description || tagline;
|
const description = this.props.description || tagline;
|
||||||
const url =
|
const path = getPath(
|
||||||
this.props.config.url +
|
this.props.config.baseUrl + (this.props.url || 'index.html'),
|
||||||
this.props.config.baseUrl +
|
this.props.config.cleanUrl,
|
||||||
(this.props.url || 'index.html');
|
);
|
||||||
|
const url = this.props.config.url + path;
|
||||||
let docsVersion = this.props.version;
|
let docsVersion = this.props.version;
|
||||||
|
|
||||||
const liveReloadScriptUrl = liveReloadServer.getReloadScriptUrl();
|
const liveReloadScriptUrl = liveReloadServer.getReloadScriptUrl();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue