Coder Social home page Coder Social logo

dignity666 / hanhanblog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wrm244/docusaurus-theme-zen

0.0 0.0 0.0 2.83 MB

这是使用docusaurus搭建的主题,结合了docusaurus简单易用与其他开源页面设计方案 | This is a theme built with docusaurus, which combines the simplicity and ease of use of docusaurus with the advantages of other open source page design solutions.

Home Page: https://wrm244.github.io/docusaurus-theme-zen/

License: MIT License

JavaScript 10.12% TypeScript 54.05% CSS 18.39% SCSS 17.04% MDX 0.41%

hanhanblog's Introduction

hanhanBlog

last-commit Github Action standard-readme compliant node-current GitHub code size in bytes GitHub Release Date

Online Preview | English


Built with Docusaurus Built with Netlify

介绍

网站首页

网站首页

这是使用docusaurus搭建的主题,结合了docusaurus简单易用与其他开源页面设计方案、支持MDX和React、可扩展和定制等优点,以及加上多设计美观、博客与文档一体的主题,为你提供了一个优秀的个人页面解决方案。该主题使用🦖 Docusaurus搭建,参考kuizuo进行二次修改,遵循MIT协议。

This is a theme built with docusaurus, which combines the simplicity and ease of use of docusaurus with other open source page design solutions, supports MDX and React, is extensible and customizable, and also has a beautiful design, a blog and documentation integrated theme, providing you with an excellent personal page solution.

特性

  • 主页+博客+文档三合一
  • 利用Typescript自定义页面
  • 生成全静态网页文件
  • 优化页面符合现代美观(毛玻璃虚化样式,pwa优化...)
  • 支持国际化
  • 代码项目展示
  • 代码块显示行号
  • 结合obsidian进行写作
  • tex数学公式渲染
  • 直接转为幻灯片格式,可在线浏览放映
  • 个人简历页面
  • 分享功能

前几点是docusaurus自带特性,参考kuizuo进行二次修改

目录结构

├── blog                           # 博客
│   ├── first-blog.md
│   └── authors.yml                # 作者信息(可以多个作者)
├── docs                           # 文档/笔记
│   └── stack
│         └──introduction.md       # 笔记介绍
├── data                           # 项目/导航/友链数据
│   ├── friend.ts                  # 友链
│   ├── project.ts                 # 项目
│   └── resource.ts                # 资源导航
├── i18n                           # 国际化
├── src
│   ├── components                 # 组件
│   ├── css                        # 自定义CSS
│   ├── pages                      # 自定义页面
│   ├── plugin                     # 自定义插件
│   └── theme                      # 自定义主题组件
├── static                         # 静态资源文件
│   └── assets                     # 静态文件
├── docusaurus.config.js           # 站点的配置信息
├── sidebars.js                    # 文档的侧边栏
├── package.json
└── yarn.lock                      # 建议使用yarn保留

安装

克隆仓库并安装依赖

git clone https://github.com/wrm244/docusaurus-theme-zen.git ./blog
cd blog
yarn
yarn start

国内仓库备份

git clone https://gitee.com/wrm244/docusaurus-theme-zen.git ./blog
cd blog
yarn

生成静态网页代码(./build)

yarn run build

启动服务

yarn run serve

Github Action CI

该流程配置会同步部署到云服务器与GitHub Pages上面: 修改/.github/workflows/ci.yml路径下的配置文件

name: ci

on:
  push:
    branches:
      - main
jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Use Node.js v18.5
        uses: actions/setup-node@v3
        with:
          node-version: '18.5.0'

      #使用缓存
      - name: Cache node modules
        uses: actions/cache@v1
        id: cache
        with:
          path: node_modules
          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-
      - name: Install Dependencies
        if: steps.cache.outputs.cache-hit != 'true'
        run: yarn install
      
      - name: Build Project
        run: |
          yarn run build

      #使用SSH同步到云服务器
      # - name: SSH Deploy
      #   uses: easingthemes/[email protected]
      #   env:
      #     SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
      #     ARGS: '-avzr --delete'
      #     SOURCE: './build'
      #     REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
      #     REMOTE_USER: 'root'
      #     TARGET: '/www/wwwroot/wrm244'

      - name: Github page Deploy
        uses: wrm244/docusaurus-deploy-action@master # 
        env:
          PERSONAL_TOKEN: ${{ secrets.PERSION_TOKEN }} # 你的Github个人账号密钥
          PUBLISH_REPOSITORY: wrm244/docusaurus-theme-zen # 公共仓库,格式:GitHub 用户名/仓库名
          BRANCH: gh-pages # 部署分支
          PUBLISH_DIR: ./build # 部署 ./build 目录下的文件

License

MIT © 河山 100%

hanhanblog's People

Contributors

dependabot[bot] avatar dignity666 avatar wrm244 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.