mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-04 01:09:20 +02:00
fix(v2): use site title if enabled blog-only mode (#2259)
This commit is contained in:
parent
bb82d0e073
commit
b1e079f4fe
3 changed files with 9 additions and 3 deletions
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -21,7 +21,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">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue