Skip to content

Commit

Permalink
Use static pages for multilang
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotdaniel committed Oct 30, 2024
1 parent ae5f585 commit 8435774
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 217 deletions.
9 changes: 4 additions & 5 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
// @ts-check
import { defineConfig } from 'astro/config';
import node from '@astrojs/node';
import tailwind from '@astrojs/tailwind';

// https://astro.build/config
export default defineConfig({
integrations: [tailwind()],
site: 'https://jajanku.app',
output: 'hybrid',
adapter: node({
mode: 'standalone',
}),
i18n: {
defaultLocale: "en",
locales: ["en", "id"]
},

// To enable serving the site to other devices on network when developing
server: {
Expand Down
196 changes: 0 additions & 196 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
},
"dependencies": {
"@astrojs/check": "^0.9.3",
"@astrojs/node": "^8.3.4",
"@astrojs/tailwind": "^5.1.1",
"astro": "^4.15.8",
"tailwindcss": "^3.4.12",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
---
export const prerender = false;
import DarkLayout from "../../../layouts/DarkLayout.astro";
import Contact from "../../../components/Contact.astro";
import Accordion from "../../../components/Accordion.astro";
import DarkLayout from "../../layouts/DarkLayout.astro";
import Contact from "../../components/Contact.astro";
import Accordion from "../../components/Accordion.astro";
import strings from "../../../strings.json";
import strings from "../../strings.json";
const languageCode = Astro.url.searchParams.get('lang') || 'en';
const languageCode = 'en';
const paymentAppExamples = strings[languageCode as keyof typeof strings].emailNotifications.paymentAppExamples;
const contact = strings[languageCode as keyof typeof strings].emailNotifications.contact;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
---
export const prerender = false;
import DarkLayout from "../../../layouts/DarkLayout.astro";
import Contact from "../../../components/Contact.astro";
import Accordion from "../../../components/Accordion.astro";
import DarkLayout from "../../layouts/DarkLayout.astro";
import Contact from "../../components/Contact.astro";
import Accordion from "../../components/Accordion.astro";
import strings from "../../../strings.json";
import strings from "../../strings.json";
const languageCode = Astro.url.searchParams.get('lang') || 'en';
const languageCode = 'en';
const faqs = strings[languageCode as keyof typeof strings].faqs.content;
const preTitle = strings[languageCode as keyof typeof strings].faqs.preTitle;
const preTitle = strings[languageCode as keyof typeof strings].faqs.preTitle;
const contact = strings[languageCode as keyof typeof strings].faqs.contact;
---
Expand Down
Loading

0 comments on commit 8435774

Please sign in to comment.