Add config option for setting title of the blog sidebar (#770)

* Allow controlling the title of the blog sidebar

* Update guides-blog.md
This commit is contained in:
Jonathan Ingram 2018-06-15 17:08:34 +10:00 committed by Yangshun Tay
parent 62a2c7c1a5
commit 58fba70dea
4 changed files with 19 additions and 3 deletions

View file

@ -97,6 +97,7 @@ class BlogPostLayout extends React.Component {
render() {
let post = this.props.metadata;
post.path = utils.getPath(post.path, this.props.config.cleanUrl);
let blogSidebarTitleConfig = this.props.config.blogSidebarTitle || {};
return (
<Site
className="sideNavVisible"
@ -124,7 +125,7 @@ class BlogPostLayout extends React.Component {
</div>
<div className="blog-recent">
<a className="button" href={this.props.config.baseUrl + 'blog'}>
Recent Posts
{blogSidebarTitleConfig.default || 'Recent Posts'}
</a>
</div>
</Container>