mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 19:41:02 +08:00
refactor: replace astro.config site value with SITE.website
This commit is contained in:
+2
-1
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user