Giter Site home page Giter Site logo

bedoom.github.io's Introduction

bedoom.top

author license

This is Bedoom's Blog. I will share best things with you.

My Personal Website:

Visit => bedoom.top.

Powered by Jekyll & TeXt Theme. forked by tianqi.name

特性

  • 响应式
  • HTML 语意化
  • 皮肤
  • 代码高亮主题
  • 国际化
  • 搜索
  • 目录
  • 作者(支持多个)
  • 附加样式(提示,标签,图片,图标,按钮,栅格等)
  • 扩展(音频,视频,幻灯片,在线示例)
  • Markdown 增强
  • 分享
  • RSS

安装

下载 TeXt Theme主题或者导入仓库。

方法一:下载安装包


方法二:点击fork按钮导入仓库。


直接fork

这种方式是最为快捷,但是在gitee上无法fork。这时可以用到方法三。

方法三:


gitee导入

gitee很人性化的设计了从“GitHub/GitLab”导入仓库的功能,可以使用此功能来实现导入。

配置

关于具体配置,我推荐去看一下作者的官方文档,写的特别好,我就不再班门弄斧了😁。

具体功能我全部体验了一番,有些许小问题。

  • 使用网易云播放音乐时静音。(其他的音乐播放器没试,这个功能有点鸡肋不用也罢)
  • 评论提供gitalk性能不够稳定,果然是免费的。。。
  • 代码的字体太小(这个可以改变)

其余没有什么问题,总体来说,是一款非常完美的主题,做到了白嫖用户看VIP视频的体验。

第二个就是补充一下作者的官方文档中没有讲到的几点。第一,就是对于普通用户来说,需要该那几个配置文件呢?当然config文件当然需要改,除此之外还有下图两个文件也可以改。


通过data文件夹可以修改license, author, local, navigation, variables。通过名称就可以看出是修改许可证类型,作者,本地语言, 侧边栏内容和变量。

通过includes文件夹可以修改有关主题的一些样式,比如上面提到的代码字体太小,就可以在它里面实现。

撰写博客

博客必须是md文档,且名称是时间+名称的格式。然后放在post文件夹下就可以实现。

关于撰写博客的选择,建议是PicGo+Typora工具集。PicGo 是上传图片到图床的工具(建议图床建在gitee上👀,这样比较方便管理)。Typora 是md的好伙伴😼,而且也提供PicGo 的图床功能,这简直天作之合😎。


如果你觉得每次写文件头太累,可以写一个Rekefile文件,参考我的文件,在命名行运行

rake post "new post"

就可以得到一个md文件,而且自带yaml头文件。


Github与Gitee仓库同步

  1. 配置私钥

    为了能让Gitee访问我们的Github仓库,首先要在Gitee中添加一个SSH-key的公钥:

    ssh-keygen -t rsa -C <你的邮箱>
    

    然后将.pub结尾的公钥上传到gitee;

    在你需要同步Github仓库中,将私钥上传到这个仓库的Secrets中;

    命名为:GITEE_PRIVATE_KEY

  2. 配置gitee Token

    为了让Github可以操作Gitee中的仓库等内容,和Github类似,我们还需要一个Gitee中的Token;

    所以在Gitee你的个人设置中创建一个Gitee令牌(私人令牌)。


    然后将gitee token上传到这个仓库的Secrets中。

    命名为:GITEE_TOKEN

  3. 创建workflow

    分享一下我的模块:

    on:
      workflow_dispatch:
      schedule:
        - cron: '0 1 * * *'
    
    name: Mirror GitHub Selected Repos to Gitee
    jobs:
      run:
        name: Run
        runs-on: ubuntu-latest
        steps:
        - name: Checkout source codes
          uses: actions/checkout@v2
        - name: Mirror Github to Gitee with white list
          uses: Yikun/hub-mirror-action@master
          with:
            src: github/JasonkayZK
            dst: gitee/jasonkay
            dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
            dst_token:  ${{ secrets.GITEE_TOKEN }}
            static_list: 'bedoom.github.io'
            mappings: "bedoom.github.io=>bedoom"
            force_update: true
    

    如果你需要的话,只需要改变5个变量:

    • schedule: 定义同步时间,采用的标准UTC时间
    • src:github源地址。
    • dst:gitee源地址。
    • static_list:需要同步的仓库,用逗号分割。
    • mappings:同步库映像,因为github中是bedoom.github.io,而gitee中默认是bedoom,所以要同步。

TODO

由于不能自定义域名,因此gitee和github需要两个地址才可以,暂时做一个备份吧😁

bedoom.github.io's People

Contributors

bedoom avatar

Watchers

 avatar

Forkers

chfangfang

bedoom.github.io's Issues

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.