Update Docsuarus footer

This commit is contained in:
Joel Marcey 2017-12-11 16:15:26 -08:00
parent 8919673f98
commit 7aee74a43f
2 changed files with 43 additions and 11 deletions

View file

@ -7,6 +7,24 @@
const React = require("react"); const React = require("react");
const GithubButton = props => (
<a
className="github-button" // part of the https://buttons.github.io/buttons.js script in siteConfig.js
href={`https://github.com/${props.config.organizationName}/${props.config.projectName}`}
data-icon="octicon-star"
data-count-href={`/${props.config.organizationName}/${props.config.projectName}/stargazers`}
data-count-api={`/repos/${props.config.organizationName}/${props.config.projectName}#stargazers_count`}
data-count-aria-label="# stargazers on GitHub"
aria-label="Star this project on GitHub"
>
Star
</a>
);
GithubButton.propTypes = {
config: React.PropTypes.object
};
class Footer extends React.Component { class Footer extends React.Component {
render() { render() {
return ( return (
@ -25,10 +43,28 @@ class Footer extends React.Component {
<h5>Docs</h5> <h5>Docs</h5>
<a <a
href={` href={`
${this.props.config.baseUrl}docs/installation.html`} ${this.props.config.baseUrl}docs/${this.props.language}/installation.html`}
> >
Getting Started Getting Started
</a> </a>
<a
href={`
${this.props.config.baseUrl}docs/${this.props.language}/versioning.html`}
>
Versioning
</a>
<a
href={`
${this.props.config.baseUrl}docs/${this.props.language}/translation.html`}
>
Localization
</a>
<a
href={`
${this.props.config.baseUrl}docs/${this.props.language}/search.html`}
>
Adding Search
</a>
</div> </div>
<div> <div>
<h5>Community</h5> <h5>Community</h5>
@ -38,21 +74,16 @@ class Footer extends React.Component {
> >
User Showcase User Showcase
</a> </a>
<a href="https://twitter.com/docusaurus">
Twitter
</a>
</div> </div>
<div> <div>
<h5>More</h5> <h5>More</h5>
<a href="https://github.com/facebook/docusaurus"> <a href="https://github.com/facebook/docusaurus">
GitHub GitHub
</a> </a>
<a <GithubButton config={this.props.config} />
className="github-button"
href="https://github.com/facebook/docusaurus"
data-icon="octicon-star"
data-show-count="true"
aria-label="Star this project on GitHub"
>
Star
</a>
</div> </div>
</section> </section>

View file

@ -81,7 +81,8 @@ const siteConfig = {
copyright: "Copyright © " + new Date().getFullYear() + " Facebook Inc.", copyright: "Copyright © " + new Date().getFullYear() + " Facebook Inc.",
highlight: { highlight: {
theme: "solarized-dark" theme: "solarized-dark"
} },
scripts: ["https://buttons.github.io/buttons.js"]
}; };
module.exports = siteConfig; module.exports = siteConfig;