mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
add sourceCodeButton to site config (#93)
This commit is contained in:
parent
a3d1fb693b
commit
9c7d8e55a9
2 changed files with 16 additions and 6 deletions
|
@ -17,6 +17,10 @@ class Head extends React.Component {
|
|||
links.map(link => {
|
||||
if (link.blog) hasBlog = true;
|
||||
});
|
||||
let sourceCodeButton = this.props.config.sourceCodeButton;
|
||||
// defaults to github, but other values may be allowed in the future
|
||||
let includeGithubButton =
|
||||
sourceCodeButton === 'github' || sourceCodeButton == null;
|
||||
return (
|
||||
<head>
|
||||
<meta charSet="utf-8" />
|
||||
|
@ -64,7 +68,9 @@ class Head extends React.Component {
|
|||
title={this.props.config.title + " Blog RSS Feed"}
|
||||
/>
|
||||
)}
|
||||
<script async defer src="https://buttons.github.io/buttons.js" />
|
||||
{includeGithubButton &&
|
||||
<script async defer src="https://buttons.github.io/buttons.js" />
|
||||
}
|
||||
</head>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue