Coder Social home page Coder Social logo

blog's Introduction

rcore-os Blog

发布博客的流程

  1. 将本仓库 clone 或者 fork 到本地,并进入 blog 目录下;
  2. 安装 Hexo
    npm install hexo-cli -g 
    npm install hexo --save
    
  3. 创建新博客: hexo n "<blog-title>",其中 <blog-title> 为博客标题;
  4. 此时在 blog/source/_posts/ 目录下会看到 <blog-title>.md 以及一个名为 <blog-title> 的文件夹,我们需要将博客的内容放在 <blog-title>.md 中,并将这篇博客相关的图片放在 <blog-title> 文件夹中。注意,请不要修改其他文件;
  5. 写完博客后,若该repo对应的本地文件夹根目录存在package-lock.json文件,请手动删除,可用git rm -f package-lock.json,之后再commit;
  6. 修改之后,通过 push 或者提 pr 的形式将博客推送到远程仓库,Github 会自动重新构建静态网页并部署到 Github Pages。

博客分类/标签信息

打开 Hexo 为我们建好的 <blog-title>.md,我们会看到这样的开头:

---
title: <blog-title>
date: 2020-07-15 16:40:28
tags:
---

我们在其中加入分类/标签/作者信息:

---
title: <blog-title>
date: 2020-07-15 16:40:28
categories:
    - <catogory>
tags:
    - author:<your_github_id>
    - repo:<rcore-os-repo_you_worked_on>
    - <other_tag_0>
    - <other_tag_1>
    - ...
---
  • 分类:目前没有对嵌套分类进行处理,希望大家最多只分一类,不要有多种类型;
  • 标签:博客默认只有一个作者,所以目前想到用不同的标签对作者以及本篇博客相关工作所在的仓库进行区分。至于其他的标签可以自由发挥,但是当已经存在类似的标签时应该沿用已有的而不是新建另外一个。

数学公式支持

只需在博客开头区打开 mathjax 开关即可:

mathjax: true

插入本地图片

目前这项功能还很简陋...之后再慢慢优化。

假设你要插入一张 <image-file>,那么首先你应该把它放在 blog/source/_post/<blog-title> 文件夹中,然后在需要插入图片的位置,用如下的 tag 来插入图片(注意:这里的'<'和'>'只是为了标识变量,插入图片的时候应该移除它们):

{% asset_img <image-file> <image-title> %}

其功能等同于 ![<image-title>](<image-file>)

预览

博客根据标记<!-- more -->为Github Pages首页提供预览

可在博客中适当位置添加标记<!-- more -->,该标记以下的内容将不会在Github Pages的首页展示

特殊:紧跟开头加入标记(如下所示),会在Github Pages的首页全片幅展示你的博客

---
title: <blog-title>
date: 2020-07-15 16:40:28
tags:
---
<!-- more -->

Log

blog's People

Contributors

wyfcyx avatar limingth avatar shzhxh avatar xyongcn avatar yuoo655 avatar beavercat7 avatar chenzhiy2001 avatar 73fc avatar lispking avatar andre-hjr avatar luojia65 avatar freheit889 avatar yunwei37 avatar sunnysyy2005 avatar jackyliu16 avatar werifu avatar yfblock avatar skyfan2002 avatar lmk0724 avatar zhaiqiming avatar tunghohin avatar aa1hshh avatar thy1037 avatar uran0sh avatar summervibes avatar yggdrasil-model avatar shiweiwww avatar godones avatar wangtao-creator avatar sinofp 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.