mirror of
https://github.com/sergeyyarkov/yarkov.tech.git
synced 2026-10-11 10:29:21 +03:00
changed article url
This commit is contained in:
parent
d935483507
commit
487b7e2add
@ -9,7 +9,7 @@ export type ArticleItemProps = {
|
||||
export const ArticleItem: Component<ArticleItemProps> = (props) => {
|
||||
return (
|
||||
<article class="article-item">
|
||||
<a href={`/${new Date(props.data.published_at).toLocaleDateString('en-CA')}/${props.data.slug}`}>
|
||||
<a href={`/blog/${new Date(props.data.published_at).toLocaleDateString('en-CA')}/${props.data.slug}`}>
|
||||
<h3>{props.data.title}</h3>
|
||||
<p>
|
||||
<time datetime={props.data.published_at.toString()}>{DateFormatter.format(new Date(props.data.published_at))}</time>
|
||||
|
||||
@ -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<ArticleType>('../../content/articles/**/*.md');
|
||||
const data = await Astro.glob<ArticleType>('../../../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}`;
|
||||
@ -19,7 +19,7 @@ const articles = utils.transformArticles(data);
|
||||
</SplashHeading>
|
||||
<SplashLinks>
|
||||
<Link icon='information' href='/about'>обо мне</Link>
|
||||
<Link icon='email_filled' href='/about'>написать мне</Link>
|
||||
<Link icon='email_filled' href='/contacts'>написать мне</Link>
|
||||
</SplashLinks>
|
||||
</Splash>
|
||||
<RecentArticles articles={articles} length={4} />
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
--border-radius-lg: 5px;
|
||||
|
||||
/* Sizes */
|
||||
--content-width: 760px;
|
||||
--content-width: 820px;
|
||||
--content-padding: 24px;
|
||||
|
||||
--opacity-hover: 0.7;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user