Skip to content

Commit

Permalink
fix(v2): use site title if enabled blog-only mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 committed Jan 31, 2020
1 parent 4b5ef84 commit da09d5b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@

import React from 'react';

import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import BlogPostItem from '@theme/BlogPostItem';
import BlogListPaginator from '@theme/BlogListPaginator';

function BlogListPage(props) {
const {metadata, items} = props;
const {
siteConfig: {title: siteTitle},
} = useDocusaurusContext();
const isBlogOnlyMode = metadata.permalink === '/';
const title = isBlogOnlyMode ? siteTitle : 'Blog';

return (
<Layout title="Blog" description="Blog">
<Layout title={title} description="Blog">
<div className="container margin-vert--xl">
<div className="row">
<div className="col col--8 col--offset-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function BlogTagsListPage(props) {
.filter(item => item != null);

return (
<Layout title="Blog Tags" description="Blog Tags">
<Layout title="Tags" description="Blog Tags">
<div className="container margin-vert--xl">
<div className="row">
<div className="col col--8 col--offset-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function BlogTagsPostPage(props) {

return (
<Layout
title={`Blog | Tagged "${tagName}"`}
title={`Posts tagged "${tagName}"`}
description={`Blog | Tagged "${tagName}"`}>
<div className="container margin-vert--xl">
<div className="row">
Expand Down

0 comments on commit da09d5b

Please sign in to comment.