Skip to content

Commit

Permalink
Project adapter build settings does not consider nested paths
Browse files Browse the repository at this point in the history
Fixes #7
  • Loading branch information
vratskyi committed Feb 29, 2024
1 parent 076c7f4 commit 0b150ad
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 17 deletions.
6 changes: 3 additions & 3 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ export default defineConfig({
defaultStrategy: 'viewport'
},
experimental: {
clientPrerender: true
clientPrerender: false
},
output: "hybrid",
adapter: cloudflare({
mode: 'directory',
mode: 'advanced',
functionPerRoute: true,
routes: {
strategy: 'auto'
strategy: 'include'
}
})
});
3 changes: 2 additions & 1 deletion src/pages/blog/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import blur from "@/assets/img/bg.png";
import { getAbsoluteLocaleUrl } from "astro:i18n";
getAbsoluteLocaleUrl("en");
export const prerender = true;
export const prerender = false;
import { Buffer } from 'node:buffer';
const allPosts = await getCollection("posts");
---
Expand Down
3 changes: 2 additions & 1 deletion src/pages/en/404.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import Head from "@components/Head.astro";
import { getAbsoluteLocaleUrl } from "astro:i18n";
getAbsoluteLocaleUrl("en");
export const prerender = true;
export const prerender = false;
import { Buffer } from 'node:buffer';
---
<Head title='Error 404' />
Expand Down
3 changes: 2 additions & 1 deletion src/pages/en/about.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import blur from "/src/assets/img/bg.png";
import { getAbsoluteLocaleUrl } from "astro:i18n";
getAbsoluteLocaleUrl("en");
export const prerender = true;
export const prerender = false;
import { Buffer } from 'node:buffer';
---

Expand Down
3 changes: 2 additions & 1 deletion src/pages/en/blog/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import { getLangFromUrl, useTranslations } from '@/i18n/utils';
const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
export const prerender = true;
export const prerender = false;
import { Buffer } from 'node:buffer';
getAbsoluteLocaleUrl("en");
Expand Down
3 changes: 2 additions & 1 deletion src/pages/en/blog/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { getAbsoluteLocaleUrl } from "astro:i18n";
getAbsoluteLocaleUrl("en");
export const prerender = true;
export const prerender = false;
import { Buffer } from 'node:buffer';
const allPosts = await getCollection("posts");
---
Expand Down
3 changes: 2 additions & 1 deletion src/pages/en/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import Button from "@/components/Button.astro";
import { getRelativeLocaleUrl, getAbsoluteLocaleUrl } from 'astro:i18n';
getAbsoluteLocaleUrl("en");
export const prerender = true;
export const prerender = false;
import { Buffer } from 'node:buffer';
const blogURL=getRelativeLocaleUrl("en", "blog");
Expand Down
3 changes: 2 additions & 1 deletion src/pages/en/portfolio.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import PortfolioCard from "@/components/PortfolioCard.astro";
import { getAbsoluteLocaleUrl } from "astro:i18n";
getAbsoluteLocaleUrl("en");
export const prerender = true;
export const prerender = false;
import { Buffer } from 'node:buffer';
let title = Astro.props;
---
Expand Down
3 changes: 2 additions & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import Button from "@/components/Button.astro";
import { getRelativeLocaleUrl, getAbsoluteLocaleUrl } from 'astro:i18n';
getAbsoluteLocaleUrl("en");
export const prerender = true;
export const prerender = false;
import { Buffer } from 'node:buffer';
const blogURL=getRelativeLocaleUrl("en", "blog");
Expand Down
3 changes: 2 additions & 1 deletion src/pages/ru/404.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import Head from "@components/Head.astro";
import { getAbsoluteLocaleUrl } from "astro:i18n";
getAbsoluteLocaleUrl("ru");
export const prerender = true;
export const prerender = false;
import { Buffer } from 'node:buffer';
---
<Head title='Ошибка 404' />
Expand Down
3 changes: 2 additions & 1 deletion src/pages/ru/about.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import blur from "/src/assets/img/bg.png";
import { getAbsoluteLocaleUrl } from "astro:i18n";
getAbsoluteLocaleUrl("ru");
export const prerender = true;
export const prerender = false;
import { Buffer } from 'node:buffer';
---

Expand Down
3 changes: 2 additions & 1 deletion src/pages/ru/blog/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import { getLangFromUrl, useTranslations } from '@/i18n/utils';
const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
export const prerender = true;
export const prerender = false;
import { Buffer } from 'node:buffer';
getAbsoluteLocaleUrl("ru");
Expand Down
3 changes: 2 additions & 1 deletion src/pages/ru/blog/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import blur from "@/assets/img/bg.png";
import { getAbsoluteLocaleUrl } from "astro:i18n";
getAbsoluteLocaleUrl("ru");
export const prerender = true;
export const prerender = false;
import { Buffer } from 'node:buffer';
const allPosts = await getCollection("posts");
---
Expand Down
3 changes: 2 additions & 1 deletion src/pages/ru/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import Button from "@/components/Button.astro";
import { getRelativeLocaleUrl, getAbsoluteLocaleUrl } from 'astro:i18n';
getAbsoluteLocaleUrl("ru");
export const prerender = true;
export const prerender = false;
import { Buffer } from 'node:buffer';
const blogURL=getRelativeLocaleUrl("ru", "blog");
---
Expand Down
3 changes: 2 additions & 1 deletion src/pages/ru/portfolio.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import PortfolioCard from "@/components/PortfolioCard.astro";
import { getAbsoluteLocaleUrl } from "astro:i18n";
getAbsoluteLocaleUrl("ru");
export const prerender = true;
export const prerender = false;
import { Buffer } from 'node:buffer';
let title = Astro.props;
---
Expand Down

0 comments on commit 0b150ad

Please sign in to comment.