mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
✨ feat: Add markdown support plus /blog (#107)
Adds `/blog` page with support for `.md` and `.mdx` files. What we learnt in setting this up will be packages in a package `@nestri/mdx` and used to set up the `/docs` and the `/terms` and `/privacy` routes
This commit is contained in:
44
infra/www.ts
44
infra/www.ts
@@ -1,5 +1,4 @@
|
||||
//Deploys the website to cloudflare pages under the domain nestri.io (redirects all requests to www.nestri.io to avoid duplicate content)
|
||||
// const cloudflareAccountId = new sst.Secret("CloudflareAccountId");
|
||||
|
||||
export const www = new cloudflare.PagesProject("www", {
|
||||
name: "nestri",
|
||||
@@ -7,7 +6,7 @@ export const www = new cloudflare.PagesProject("www", {
|
||||
productionBranch: "main",
|
||||
buildConfig: {
|
||||
rootDir: "apps/www",
|
||||
// buildCommand: "bun run build",
|
||||
buildCommand: "bun run build",
|
||||
destinationDir: "dist"
|
||||
},
|
||||
deploymentConfigs: {
|
||||
@@ -31,6 +30,47 @@ export const www = new cloudflare.PagesProject("www", {
|
||||
}
|
||||
});
|
||||
|
||||
//TODO: Maybe handle building Qwik ourselves? This prevents us from relying on CF too much, we are open-source anyway 🤷🏾♂️
|
||||
//TODO: Add a local dev server for Qwik that can be linked with whatever we want
|
||||
//TODO: Link the www PageRule with whatever we give to the local dev server
|
||||
|
||||
export const wwwDev = new sst.x.DevCommand("www", {
|
||||
dev: {
|
||||
command: "bun run dev",
|
||||
directory: "apps/www",
|
||||
autostart: true,
|
||||
},
|
||||
})
|
||||
|
||||
// //This creates a resource that can be accessed by itself
|
||||
// new sst.Linkable.wrap(cloudflare.PageRule, (resource) => ({
|
||||
// // these properties will be available when linked
|
||||
// properties: {
|
||||
// arn: resource.urn
|
||||
// }
|
||||
// }))
|
||||
// //And then you call your linkable resource like this:
|
||||
// // const www = cloudflare.PageRule("www", {})
|
||||
|
||||
// //this creates a linkable resource that can be linked to other resources
|
||||
// export const linkable2 = new sst.Linkable("ExistingResource", {
|
||||
// properties: {
|
||||
// arn: "arn:aws:s3:::nestri-website-artifacts-prod-nestri-io-01h70zg50qz5z"
|
||||
// },
|
||||
// include: [
|
||||
// sst.aws.permission({
|
||||
// actions: ["s3:*"],
|
||||
// resources: ["arn:aws:s3:::nestri-website-artifacts-prod-nestri-io-01h70zg50qz5z"]
|
||||
// }),
|
||||
// sst.cloudflare.binding({
|
||||
// type: "r2BucketBindings",
|
||||
// properties: {
|
||||
// bucketName: "nestri-website-artifacts-prod-nestri-io-01h70zg50qz5z",
|
||||
// }
|
||||
// })
|
||||
// ]
|
||||
// })
|
||||
|
||||
export const outputs = {
|
||||
www: www.subdomain,
|
||||
};
|
||||
Reference in New Issue
Block a user