From 487b7e2addaf03f67387e0f9a5ac4204b2d8fb09 Mon Sep 17 00:00:00 2001 From: Sergey Yarkov Date: Mon, 1 Aug 2022 02:05:38 +0300 Subject: [PATCH] changed article url --- src/components/ArticleItem/ArticleItem.tsx | 2 +- src/pages/{ => blog}/[...slug].astro | 2 +- src/pages/index.astro | 2 +- src/styles/theme.scss | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename src/pages/{ => blog}/[...slug].astro (89%) diff --git a/src/components/ArticleItem/ArticleItem.tsx b/src/components/ArticleItem/ArticleItem.tsx index 93b046c..13e500d 100644 --- a/src/components/ArticleItem/ArticleItem.tsx +++ b/src/components/ArticleItem/ArticleItem.tsx @@ -9,7 +9,7 @@ export type ArticleItemProps = { export const ArticleItem: Component = (props) => { return (
- +

{props.data.title}

diff --git a/src/pages/[...slug].astro b/src/pages/blog/[...slug].astro similarity index 89% rename from src/pages/[...slug].astro rename to src/pages/blog/[...slug].astro index 6ff114f..24fabf6 100644 --- a/src/pages/[...slug].astro +++ b/src/pages/blog/[...slug].astro @@ -5,7 +5,7 @@ import ArticleLayout from '@root/layouts/article.astro'; // TODO: generate pages based on user language export async function getStaticPaths() { - const data = await Astro.glob('../../content/articles/**/*.md'); + const data = await Astro.glob('../../../content/articles/**/*.md'); return data.map((article) => { const published_at = new Date(article.frontmatter.published_at).toLocaleDateString('en-CA'); const slug = `${published_at}/${article.frontmatter.slug}`; diff --git a/src/pages/index.astro b/src/pages/index.astro index df9c19a..c44816c 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -19,7 +19,7 @@ const articles = utils.transformArticles(data); обо мне - написать мне + написать мне diff --git a/src/styles/theme.scss b/src/styles/theme.scss index 95bfaaa..727a519 100644 --- a/src/styles/theme.scss +++ b/src/styles/theme.scss @@ -80,7 +80,7 @@ --border-radius-lg: 5px; /* Sizes */ - --content-width: 760px; + --content-width: 820px; --content-padding: 24px; --opacity-hover: 0.7;