Giter VIP home page Giter VIP logo

astro_v2's Introduction

🌍 siaofei.github.io

Astro 4.11+ 🤝 Apline.js 🤝 Tailwind CSS

🛠️ 开发

需要安装 Nodejs >= 22.5(推荐使用 nvm)和 pnpm

🚀 更新

使用 pnpm 包管理器更新 Astro 和官方插件到最新版本。

pnpm dlx @astrojs/upgrade

Note

Astro Icon 是第三方插件,暂时不支持 Astro 官方更新命令。

pnpm add astro-icon@latest

👉 常用命令

Command Action
pnpm install Installs dependencies
pnpm run dev Starts local dev server at localhost:4321
pnpm run build Build your production site to ./dist/
pnpm run preview Preview your build locally, before deploying
pnpm run astro ... Run CLI commands like astro add, astro check
pnpm run astro -- --help Get help using the Astro CLI
pnpm store prune Removes unreferenced packages from the store

🌷 Prettier & ESLint

Important

如果使用编辑器例如 VS Code,则不需要手动进行格式化。

终端运行 prettier . --write 格式化工作目录所有文件。

pnpm exec prettier . --write

终端运行使用 eslint 命令。

# pnpm exec eslint [options] [file|dir|glob]*
pnpm exec eslint . # format all files in worksapce

🧐 使用方法

🔖 书签

src/content/bookmarks 下创建新书签。

# src/content/bookmarks/example.yaml
url: https://example.com # 必填项:标签的网址
date: 2024-08-01 # 必填项:创建日期(建议不要修改)
title: 书签标题 # 可选项
description: 标签描述 # 可选项
tags: ['标签1', '标签1', '标签1'] # 可选项:默认为 ['others']
favorite: true # 可选项:默认为 false
pinned: true # 可选项:默认为 false
keySearch: 关键字1 关键字2 关键字3 # 可选项

[!TIP] 添加标签图标 (⚠️仅支持 SVG 格式)

  1. 下载标签图标(SVG 格式)
  2. 图标放在 src/icons/tags/目录
  3. iconTagsList 添加对应的标签和图标的映射。
  4. 重新构建网站

astro_v2's People

Contributors

siaofei avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.