fix: redirect cp.nvim
This commit is contained in:
parent
f5d419f0ab
commit
69fe955d3d
4 changed files with 55 additions and 45 deletions
|
|
@ -24,11 +24,15 @@ export async function getStaticPaths() {
|
|||
const { post } = Astro.props;
|
||||
const category = Astro.params.category;
|
||||
const { Content } = await post.render();
|
||||
const data = post.data;
|
||||
const pageTitle = `${category}/${data.title ?? post.slug}`;
|
||||
const pageTitle = `${category}/${post.data.title ?? post.slug}`;
|
||||
|
||||
console.log(Astro.props);
|
||||
if (post.data?.redirect) {
|
||||
return Astro.redirect(post.data.redirect, 301);
|
||||
}
|
||||
---
|
||||
|
||||
<PostLayout frontmatter={data} post={post}>
|
||||
<PostLayout frontmatter={post.data} post={post}>
|
||||
<Fragment slot="head">
|
||||
<title>{pageTitle}</title>
|
||||
<script type="module" src="/scripts/index.js"></script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue