Skip to content

Commit

Permalink
Change tag page paths to be under /blog (#1261)
Browse files Browse the repository at this point in the history
Also change existing links to tag pages to use this new format
  • Loading branch information
rogermparent authored May 7, 2020
1 parent bce4d6a commit 43e090b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions content/blog/2020-04-06-april-20-dvc-heartbeat.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ tags:
---

Welcome to the April Heartbeat, our
[monthly roundup of cool happenings](https://dvc.org/tags/heartbeat), good reads
and other bright spots in our community.
[monthly roundup of cool happenings](https://dvc.org/blog/tags/heartbeat), good
reads and other bright spots in our community.

## News

Expand Down
2 changes: 1 addition & 1 deletion src/components/Blog/Post/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const Post: React.FC<IBlogPostData> = ({
<div className={styles.tags}>
{tags.map(tag => (
<Link
href={`/tags/${tagToSlug(tag)}`}
href={`/blog/tags/${tagToSlug(tag)}`}
className={styles.tag}
key={tag}
>
Expand Down
2 changes: 1 addition & 1 deletion src/gatsby/models/blog/createPages.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const createPages = async ({ graphql, actions }) => {

const tagPagesPromise = Promise.all(
_tags.map(({ fieldValue: tag, pageInfo: { itemCount } }) => {
const basePath = `/tags/${tagToSlug(tag)}`
const basePath = `/blog/tags/${tagToSlug(tag)}`

for (const page of pagesGenerator({ basePath, itemCount })) {
actions.createPage({
Expand Down

0 comments on commit 43e090b

Please sign in to comment.