Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use clean url for og:url when cleanUrl is true #1242

Merged
merged 1 commit into from
Feb 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions v1/lib/core/Site.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Footer = require(`${process.cwd()}/core/Footer.js`);
const translation = require('../server/translation.js');
const env = require('../server/env.js');
const liveReloadServer = require('../server/liveReloadServer.js');
const {idx} = require('./utils.js');
const {idx, getPath} = require('./utils.js');

const CWD = process.cwd();

Expand All @@ -41,10 +41,11 @@ class Site extends React.Component {
`${this.props.config.title} · ${tagline}`) ||
this.props.config.title;
const description = this.props.description || tagline;
const url =
this.props.config.url +
this.props.config.baseUrl +
(this.props.url || 'index.html');
const path = getPath(
this.props.config.baseUrl + (this.props.url || 'index.html'),
this.props.config.cleanUrl,
);
const url = this.props.config.url + path;
let docsVersion = this.props.version;

const liveReloadScriptUrl = liveReloadServer.getReloadScriptUrl();
Expand Down