创建一个高度自定义的博客

Posted justsong

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了创建一个高度自定义的博客相关的知识,希望对你有一定的参考价值。


Note

I use English to complete my writing, if you find it terrible, you can refer this post.


Welcome

Welcome to my personal website, in this hello world page, I will briefly show you how I create this website with the help of Github and Hexo . And you can also create you own, just follow me.


Steps

  1. Get a Github account .

  2. Create a new repository named “you_username”.github.io, for example, my according reposity’s name is “songwonderful.github.io”.

  3. Install Git and config it, you can refer this blog .

  4. Download Node.js and install it. But you may find the download speed is too low, download it here, which is uploaded by myself without changes.

  5. Verify you installation. Open a console and run node -v to verift the installation of node. Run npm -v to verify the installation of npm.

  6. Create a new foloder and name it as “Blog”.

  7. Install Hexo. Open a console and change path to your newly created folder. Then install hexo and init you blog.

The following code is for you to reference

bash # Change "C:UserssongBlog" to your own path cd C:UserssongBlog # Install Hexo npm install -g hexo-cli # Init your blog hexo init blog # It create a new folder named "blog" under current path. Enter this new folder cd blog npm install

  1. Config your site. Modify the _config.yml file. The following content should be changed.

    ```yml
    ~skip~
    # Site
    title: JustSong #your site‘s title
    subtitle: Better and Best #your site‘s subtitle
    description:
    keywords:
    author: JustSong #your name
    language: en
    timezone:

    ~skip~

    deploy:
    type: git
    repo: https://github.com/songwonderful/songwonderful.github.io.git #your own repo here
    branch: master
    ```

  2. Run npm install hexo-deployer-git --save I am nott very clear ablou the fuction of this command

  3. Run

    ba hexo g hexo d

    After all this done, you should can visit by this url : your_github_username.github.io

  4. Buy a domain name and config it like this:

    技术分享图片

    Remind that: domain name like XXX.xyz is very cheap.

  5. Create a file named “CNAME” on blog/source , edit its content as “you_domain_name”. Save it.

    技术分享图片

  6. Run those commands to update your site’s config infomation.

    bas hexo clean hexo g hexo d

  7. Some basic commands.

    ba # Create a new artical. hexo n "new artical" # Now you can edit it on X:***Bloglogsource\\_posts # Generate static files. hexo g # Deploy hexo d

    You use Markdown to write you posts. Here is a reference

    You can find all orders here.

  8. Congratulation. That’s all.


## Reference

以上是关于创建一个高度自定义的博客的主要内容,如果未能解决你的问题,请参考以下文章

片段中的按钮自定义视图

C# 最有用的(自定义)代码片段是啥? [关闭]

自定义对话框片段

VSCode插件开发全攻略代码片段设置自定义欢迎页

如何在 Toad for Oracle 中使用自定义代码片段?

如何在片段内创建自定义列表视图