mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 00:09:48 +02:00
Use siteConfig properties inside Example pages (#497)
Replace hardcoded values inside "footer", "help" and "users" with properties from siteConfig. Fixes #488
This commit is contained in:
parent
ad94258334
commit
37c699e8bd
3 changed files with 12 additions and 8 deletions
|
@ -13,12 +13,19 @@ const GridBlock = CompLibrary.GridBlock;
|
|||
|
||||
const siteConfig = require(process.cwd() + '/siteConfig.js');
|
||||
|
||||
function docUrl(doc, language) {
|
||||
return siteConfig.baseUrl + 'docs/' + (language ? language + '/' : '') + doc;
|
||||
}
|
||||
|
||||
class Help extends React.Component {
|
||||
render() {
|
||||
let language = this.props.language || '';
|
||||
const supportLinks = [
|
||||
{
|
||||
content:
|
||||
'Learn more using the [documentation on this site.](/test-site/docs/en/doc1.html)',
|
||||
content: `Learn more using the [documentation on this site.](${docUrl(
|
||||
'doc1.html',
|
||||
language
|
||||
)})`,
|
||||
title: 'Browse Docs',
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue