From 0632986060dadf3c708875a2c422ffdd2cd3dc43 Mon Sep 17 00:00:00 2001 From: Meekdai Date: Mon, 13 Nov 2023 17:53:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=8D=E4=B8=80=E6=AC=A1=E7=AE=80=E5=8C=96?= =?UTF-8?q?=E6=90=AD=E5=BB=BA=E6=B5=81=E7=A8=8B=EF=BC=8C=E7=9C=9F18?= =?UTF-8?q?=E7=A7=92=E6=90=AD=E5=BB=BA=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONIFG.md | 124 ------------------------------------------------------ README.md | 42 +++++++++++++++--- 2 files changed, 36 insertions(+), 130 deletions(-) delete mode 100644 CONIFG.md diff --git a/CONIFG.md b/CONIFG.md deleted file mode 100644 index 90ca30a..0000000 --- a/CONIFG.md +++ /dev/null @@ -1,124 +0,0 @@ -# 配置文件说明 - -### `config.json` 文件 - -```javascript -{ - "title":"Meekdai", - "displayTitle":"eekdai", - "subTitle":"童话是一种生活态度,仅此而已。", - "homeUrl":"http://blog.meekdai.com", - "avatarUrl":"http://meekdai.com/avatar.jpg", - "faviconUrl":"http://meekdai.com/favicon.ico", - "singlePage":["link","about"], - "GMEEK_VERSION":"v2.5" -} -``` - -以上是必须的字段,修改为自己的信息即可,下面是可以自定义字段的描述,可以选择加入到`config.json`中。 - -```javascript -"email":"meekdai@163.com", -"startSite":"02/16/2015", -"filingNum":"浙ICP备20023628号", -"onePageListNum":15, -"commentLabelColor":"#006b75", -"yearColorList":["#bc4c00", "#0969da", "#1f883d", "#A333D0"], -"i18n":"CN", -"dayTheme":"light", -"nightTheme":"dark_colorblind", -"urlMode":"pinyin", -``` -另有不清楚的也可以参考 https://github.com/Meekdai/meekdai.github.io/blob/main/config.json - - -### `.github/workflows/Gmeek.yml` 文件 - -此文件保存到指定目录即可,无需修改。 - -```yml -name: build Gmeek - -on: - workflow_dispatch: - issues: - types: [opened, edited] - -jobs: - build: - name: Generate blog - runs-on: ubuntu-20.04 - if: github.event.repository.owner.id == github.event.sender.id - permissions: write-all - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Pages - id: pages - uses: actions/configure-pages@v3 - - - name: Get config.json - run: | - echo "====== check config.josn file ======" - cat config.json - echo "====== check config.josn end ======" - sudo apt-get install jq - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - - name: Clone source code - run: | - git clone -b $(jq -r ".GMEEK_VERSION" config.json) https://github.com/Meekdai/Gmeek.git /opt/Gmeek - - - name: Install dependencies - run: | - pip install --upgrade pip - pip install -r /opt/Gmeek/requirements.txt - - - name: Generate new html - run: | - cp -r ./* /opt/Gmeek/ - cd /opt/Gmeek/ - python Gmeek.py ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} --issue_number '${{ github.event.issue.number }}' - cp -a /opt/Gmeek/docs ${{ github.workspace }} - cp -a /opt/Gmeek/backup ${{ github.workspace }} - cp /opt/Gmeek/blogBase.json ${{ github.workspace }} - - - name: update html - run: | - git config --local user.email "$(jq -r ".email" config.json)" - git config --local user.name "${{ github.repository_owner }}" - git add . - git commit -a -m '🎉auto update by Gmeek action' || echo "nothing to commit" - git push || echo "nothing to push" - sleep 3 - - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 - with: - path: 'docs/.' - - deploy: - name: Deploy blog - runs-on: ubuntu-20.04 - needs: build - permissions: - contents: write - pages: write - id-token: write - concurrency: - group: "pages" - cancel-in-progress: false - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 - -``` diff --git a/README.md b/README.md index 6dad4a3..c0c6438 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ **简体中文** | **[English](README-en.md)** # Gmeek -一个博客框架,超轻量级个人博客模板。完全基于`Github Pages` 、 `Github Issues` 和 `Github Actions`。不需要本地部署,从搭建到写作,只需要几分钟的时间,3步搭建好博客,第4步就是写作。 +一个博客框架,超轻量级个人博客模板。完全基于`Github Pages` 、 `Github Issues` 和 `Github Actions`。不需要本地部署,从搭建到写作,只需要几分钟的时间,2步搭建好博客,第3步就是写作。 - [Demo页面](http://meekdai.github.io/) - [更新日志](https://meekdai.github.io/post/Gmeek-geng-xin-ri-zhi.html) @@ -10,12 +10,13 @@ ### 安装 -1. 创建自己的`XXX.github.io`的仓库,在仓库的设置中`Pages->Build and deployment->Source`下面选择`Github Actions`。 -2. 在仓库中创建文件`config.json`和`.github/workflows/Gmeek.yml`复制[链接](CONIFG.md)中的代码分别保存。 -3. 在Issues中删除多余标签,创建自己的标签,如`link`、`about`、`日常`等。 -4. 打开一篇issue,开始写作,并且添加一个标签,保存issue后会自动创建博客内容,片刻后可通过https://XXX.github.io 访问 +1. 点击[创建仓库](https://github.com/new?template_name=Gmeek-template&template_owner=Meekdai),建议仓库名称为`XXX.github.io`,其中`XXX`为你的github用户名。 -如果有问题可在本仓库提交[Issues](https://github.com/Meekdai/Gmeek/issues) 或者添加 QQ:`294977308` +2. 在你创建好的仓库的设置`Settings`中`Pages->Build and deployment->Source`下面选择`Github Actions`。 + +3. 打开一篇issue,开始写作,并且添加一个标签,保存issue后会自动创建博客内容,片刻后可通过https://XXX.github.io 访问 + +如果有问题可在本仓库提交[Issues](https://github.com/Meekdai/Gmeek/issues) ### 特性 @@ -53,7 +54,36 @@ 7. 如果在评论里面登录后评论报错,可直接按照提示安装`utteranc app`即可 > Error: utterances is not installed on xxx/xxx.github.io. If you own this repo, install the app. Read more about this change in the PR. +### 配置文件 +`config.json` 文件 +```javascript +{ + "title":"Meekdai", + "displayTitle":"eekdai", + "subTitle":"童话是一种生活态度,仅此而已。", + "homeUrl":"http://blog.meekdai.com", + "avatarUrl":"http://meekdai.com/avatar.jpg", + "faviconUrl":"http://meekdai.com/favicon.ico", + "singlePage":[], + "GMEEK_VERSION":"last" +} +``` +以上是必须的字段,修改为自己的信息即可,下面是可以自定义字段的描述,可以选择加入到`config.json`中。 + +```javascript +"email":"meekdai@163.com", +"startSite":"02/16/2015", +"filingNum":"浙ICP备20023628号", +"onePageListNum":15, +"commentLabelColor":"#006b75", +"yearColorList":["#bc4c00", "#0969da", "#1f883d", "#A333D0"], +"i18n":"CN", +"dayTheme":"light", +"nightTheme":"dark_colorblind", +"urlMode":"pinyin", +``` +另有不清楚的也可以参考 https://github.com/Meekdai/meekdai.github.io/blob/main/config.json ### 鸣谢