Skip to content

Commit

Permalink
chore: move to server output
Browse files Browse the repository at this point in the history
  • Loading branch information
enpitsuLin committed Jan 19, 2024
1 parent 5072b8d commit 052ec47
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ export default defineConfig({
remarkPlugins,
rehypePlugins
},
output: "hybrid",
output: "server",
adapter: node({ mode: "standalone" })
});
2 changes: 0 additions & 2 deletions src/pages/blog/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import BasicLayout from '~/layouts/BasicLayout.astro';
import { usePost } from '~/lib/content';
import '~/styles/prism.css';
export const prerender = false;
const { slug } = Astro.params;
if (!slug) return Astro.redirect('/404');
const post = await usePost(slug);
Expand Down
2 changes: 2 additions & 0 deletions src/pages/blog/[page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { ITEMS_PRE_PAGE } from '~/consts';
import ListLayout from '~/layouts/ListLayout.astro';
import { usePosts } from '~/lib/content';
export const prerender = true
export async function getStaticPaths({ paginate }: GetStaticPathsOptions) {
const astronautPages = usePosts();
return paginate(astronautPages, { pageSize: ITEMS_PRE_PAGE });
Expand Down
2 changes: 0 additions & 2 deletions src/pages/friends.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import PageTitle from '~/components/PageTitle.astro';
import { SITE_DESCRIPTION, SITE_TITLE } from '~/consts';
import BasicLayout from '~/layouts/BasicLayout.astro';
export const prerender = false
const friends = (await getCollection('friends'))
.filter((i) => i.id !== 'example')
.sort(() => (Math.random() > 0.5 ? 1 : -1));
Expand Down
2 changes: 2 additions & 0 deletions src/pages/tags/[tag]/[...page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { ITEMS_PRE_PAGE, SITE_DESCRIPTION, SITE_TITLE } from '~/consts';
import BasicLayout from '~/layouts/BasicLayout.astro';
import { useAllTags, usePostsByTag } from '~/lib/content';
export const prerender = true
export async function getStaticPaths({ paginate }: GetStaticPathsOptions) {
const allTags = useAllTags();
const pages = await Promise.all(
Expand Down

0 comments on commit 052ec47

Please sign in to comment.