refactor: replace astro.config site value with SITE.website

This commit is contained in:
satnaing
2023-03-16 14:58:26 +06:30
parent 0c6d0ba6cd
commit 4fe508462e
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -4,10 +4,11 @@ import react from "@astrojs/react";
import remarkToc from "remark-toc"; import remarkToc from "remark-toc";
import remarkCollapse from "remark-collapse"; import remarkCollapse from "remark-collapse";
import sitemap from "@astrojs/sitemap"; import sitemap from "@astrojs/sitemap";
import { SITE } from "./src/config";
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
site: "https://astro-paper.pages.dev/", site: SITE.website,
integrations: [ integrations: [
tailwind({ tailwind({
config: { config: {
@@ -18,9 +18,9 @@ AstroPaper is a highly customizable Astro blog theme. With AstroPaper, you can c
## Configuring SITE ## Configuring SITE
First of all, replace site property of _`astro.config.mjs` file with your own deployed domain. (You can omit this step if you don't have deployed domain yet or you are still in development mode)_ The important configurations lies in `src/config.ts` file. Within that file, you'll see the `SITE` object where you can specify your website's main configurations.
Another important configurations lies in `src/config.ts` file. Within that file, you'll see the `SITE` object where you can specify your website's main configurations. During deveopment, it's okay to leave `SITE.website` empty. But in production mode, you should specify your deployed url in `SITE.website` option since this will be used for canonical URL, social card URL etc.. which are important for SEO.
```js ```js
// file: src/config.ts // file: src/config.ts