Gyoza User's Guide

24 年 4 月 1 日 星期一 (已编辑)
473 字
3 分钟

Pre-requisite

  • node version >= 18.18.0
  • pnpm version > 8.1.0

Installation

Clone the repository

Log into your GitHub account, open lxchapu/astro-gyoza, and click the Fork button in the upper right corner to clone the repository to your own account.

Copy the address of this repository, open a terminal, and use the git clone command to clone the repository locally.

This project recommends using pnpm as your package manager, so install pnpm if you haven't already.

Install dependencies

sh
cd astro-gyoza
pnpm install

Introduction to Commands

Running locally

sh
pnpm dev

Packaging static files

sh
pnpm build

Local Preview

sh
pnpm preview

Configuration items

Most of the configuration in this project is defined in the src/config.json file.

You should first change site.url to your own domain name to avoid navigation errors.

Below is a description of the configuration items:

json
{
  "site": {
    "url": "",
    // Website address
    "title": "",
    // Website title
    "description": "",
    // Generic site description SEO
    "keywords": "",
    // Generic site keywords SEO
    "lang": "zh-CN",
    // Language of the site
    "favicon": "",
    // Browser icon, stored in the public directory
    "appleTouchIcon": ""
    // Apple device icon, stored in the public directory
  },
  "author": {
    "name": "",
    // Author's name
    "twitterId": "",
    // Twitter account ID, starts with @, used in Open Graph
    "avatar": ""
    // Author's avatar address
  },
  // Home Hero Component
  "hero": {
    "name": "",
    // Name of the display
    "bio": "",
    // One sentence introduction
    "description": "",
    // Additional Description
    // Social Accounts
    "socials": [
      {
        "name": "",
        // Type of social platform
        "icon": "",
        // Social Platform Icons
        "url": "",
        // Links
        "color": ""
        // Icon color
      }
    ],
    "quotes": ""
    // Show a word
  },
  "color": {
    // Emphasis colors, one at a time, randomly selected from a group
    "accent": [
      {
        "light": "",
        "dark": ""
      }
    ]
  },
  // Top navigation bar
  "menus": [
    {
      "name": "Home",
      "link": "/",
      "icon": "icon-pantone"
    }
  ],
  "posts": {
    "perPage": 10
    // Number of articles displayed per page
  },
  "footer": {
    "startTime": ""
    // Blog site start time Please use ISO format
  },
  // doc search search function, please go to https://docsearch.algolia.com/apply/ to request it.
  "docSearch": {
    "appId": "",
    "apiKey": "",
    "indexName": ""
  },
  // waline comment system, go to https://waline.js.org/ to see the
  "waline": {
    "serverURL": ""
  },
  // Sponsorship
  "sponsor": {
    "wechat": ""
    // wechat appreciation code image address
  }
}

Deployment

Only Vercel is described here, you can of course choose other platforms such as Cloudflare Pages or your own server.
Before deploying, make sure you have modified site.url.

Deploy to Vercel

Log in to your Vercel account and click Add new... in the upper right corner. Then select the repository you just forked in the Import Git Repository and click the Import button.

Go to the project configuration page, click the Deploy button, and wait for the deployment to complete 👌.

Vercel will assign you a domain name, you can set a custom domain name in the project settings, please refer to the Vercel documentation for more information.

文章标题:Gyoza User's Guide

文章作者:adityabekti

文章链接:https://adityabekti.net/posts/guide[复制]

最后修改时间:


商业转载请联系站长获得授权,非商业转载请注明本文出处及文章链接,您可以自由地在任何媒体以任何形式复制和分发作品,也可以修改和创作,但是分发衍生作品时必须采用相同的许可协议。
本文采用CC BY-NC-SA 4.0进行许可。