Coder Social home page Coder Social logo

hacker's Introduction

Open Source Love GPL Licence

Hacker is a simple blog theme focused on writing. In such a trend of complex typography, choose the return to origins, focusing on writing this matter.

The beginning is moyo created a theme of Wordpress , by DaraW transplanted to Hexo.

Demo

You can refer to my blog: DaraW.
Also, you can try auto-deployment with TravisCI, refer to CodeDaraW/Blog

Installation

Firstly get the theme files, git clone or download zip both are ok.

Create a folder named Hacker in the folder themes, and copy all the theme files to the folder Hacker.

Then apply the theme in the hexo global configuration file _config.yml:

theme: Hacker

Now all are in order, just enjoy~

Notice: After every update, you'd better run command hexo clean to clean cache files before Hexo generating, in case of some problems cache files bring.

Configure

Enable comments and Google Analytics

Refering to the example configuration file _config.example.yml, create the theme configuration file _config.yml and edit it:

# gitment
gitment: false
gitment_owner:
gitment_repo:
gitment_client_id:
gitment_client_secret:

# gitalk
gitalk: false
gitalk_owner:
gitalk_admin: []
gitalk_repo:
gitalk_client_id:
gitalk_client_secret:

# valine comment
valine: false
leancloud_id:
leancloud_key:

# disqus comment
disqus: false
disqus_shortname:

# utterances comment
utterances: false
utterances_repo:

# livere city comment
livere: false
livere_data_uid:

# giscus comment
giscus: false
data_repo: 
data_repo_id: 
data_category: 
data_category_id: 
data_mapping: 
#data_term: 
data_strict: 0
data_reactions_enabled: 0
data_emit_metadata: 0
data_input_position: bottom 
data_loading: 
data_lang: 

# google analytics
googleTrackId:

# baidu analytics
baiduTrackId:

gitment: boolean,use gitment or not
gitment_owner: string,your GitHub ID
gitment_repo: string,the repo to store comment data
gitment_client_id: string,your client ID
gitment_client_secret: string,your client secret

gitalk: boolean,use gitalk or not
gitalk_owner: string,your GitHub ID
gitalk_admin: array,all the admin GitHub IDs
gitalk_repo: string,the repo to store comment data gitalk_client_id: string,your client ID gitalk_client_secret: string,your client secret

valine: boolean, use Valine or not
leancloud_id: string, your leancloud ID
leancloud_key: string, your leancloud Key

disqus: boolean, use disqus or not disqus_shortname: your disqus site shortname.

utterances: boolean, use utterances or not
utterances_repo: string,the repo to store comment data

livere: boolean, use livere city or not
livere_data_uid: string,you can find it here https://livere.com/insight/myCode

giscus: boolean, use giscus or not
data_repo: string,the repo to store comment data
data_repo_id: string,You can get it eaily from https://giscus.app
data_category: When searching for a matching discussion, giscus will only search in this category.
data_category_id: string,You can get it eaily from https://giscus.app . It is recommended to use a category with the Announcements type.
data_mapping: Enter pathname or URL or title or og:title or specific or number
data_term: If you choose specific or number in data_mapping , please turn on this option and ENTER TERM or NUMBER HERE.
data_strict: boolean, use strict title matching or not
data_reactions_enabled: boolean, enable reactions for the main post or not
data_emit_metadata: boolean, emit discussion metadata or not
data_input_position: Enter "top" or "bottom" to place the comment box above the comments or below the comments
data_loading: Enter "lazy" to Load the comments lazily or keep blank
data_lang: The language giscus will be displayed in.

googleTrackId: your Google Analytics ID, Hacker will not use Google Analytics if it's empty.

baiduTrackId: your Baidu Analytics ID, Hacker will not use Baidu Analytics if it's empty.

Enable Categories and Tags pages

Categories Page: run hexo new page categories,then modify the generated file source/categories/index.md

title: categories
date: 2017-01-30 19:16:17
layout: "categories"
---  

If you need to close comments of this page , you can add a line comments: false; title corresponds to the title of the page.

Tags Page: run hexo new page tags,then modify the generated file source/tags/index.md

title: tags
date: 2017-01-30 19:16:17
layout: "tags"
---  

Configuration is the same as Categories Page.

Add links to the menu: Edit the _config.yml file of the theme, add Categories: /categories and Tags: /tags in menu like this:

menu:
  Home: /
  Archives: /archives
  Categories: /categories
  Tags: /tags

Automation Deploy

To avoid the conflict, i added _config.xml to gitignore. so if you want to deploy the blog through automated tools, please remove _config.xml from gitignore or add symbolic link.

License

GNU GPL(General Public License) v2.0

hacker's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hacker's Issues

请问如何更改博客名字的字体?

我在header.styl里改了font-family以后没什么变化:

site-branding
text-align center
margin-bottom 2rem
font-family "Apple Chancery", italic
letter-spacing 0.1em
text-transform

谢谢!

修改字体和格式

想问一下如何调整markdown的格式和字体。hacker主题怎么使用cdn的Google字体之类?在Daraw只有的light的介绍

Icon tags not found

Hi,
the computed css rule
background: url("../../images/icon-tags.svg") center center no-repeat;
leads to a 404 error. It should be changed to
background: url("../images/icon-tags.svg") center center no-repeat;

Observed with both hexo server and hexo static generated files. I use a blog subfolder, with the following configuration:

menu:
Home: /blog/
Archives: /blog/archives
...

About Page

How can I add an about page about the author of the blog. I added the links in the menu menu: Home: / Archives: /archives About: /about like this but it won't generate anything. I get an error saying Cannot GET /about/. And Whenever I generate for deployment it shows files generated but the files are not working correctly. Here's the link for the
repo

valine 评论不生效

menu:
  Home: /
  Archives: /archives
  Categories: /categories
  Tags: /tags
# gitment
gitment: false
gitment_owner: 
gitment_repo:
gitment_client_id:
gitment_client_secret: 


# valine comment
valine: true
leancloud_id: EeCn90IlEWXDEFqvbN4ztvvw-********
leancloud_key: GqXMQoJxiDmvJYU5********

# disqus comment
disqus: false
disqus_shortname:

这是我的配置项,在Valine安全一项上已经设置我的网址,然而在网站上并没有生效。请问是还不支持吗。还是我忽略了哪些步骤?

可以加分享功能嘛?

漂亮的主题,WP时代就一直用,多谢制作

插话:可以加分享功能嘛?分享到Facebook,twitter,G+这种

多说评论添加失败

添加多说评论后,主页显示有评论按钮,但点击后会404;博客详情内不显示评论框及评论内容

Ask for help

Hi, I like your theme. But when I used, the index's blog does not show a brief in the list, while they are listed all. What do I missed? Could you help me ?

favicon

请问网站小图标怎么设置,我尝试了几种方式无法成功,我第一次弄这个,方便可以回复下吗,谢谢

Deploy Hacker themed Hexo blog to Github not working

Currently, the Hacker theme seems to not be supported by Github. Building it with the hexo deploy --generate command results in the following error:

The page build failed with the following error:

The hacker theme is not currently supported on GitHub Pages. For more information, see https://help.github.com/articles/adding-a-jekyll-theme-to-your-github-pages-site.

For information on troubleshooting Jekyll see:

  https://help.github.com/articles/troubleshooting-jekyll-builds

If you have any questions you can contact us by replying to this email.

How can I deploy the blog with your theme using the following source?

gitment 评论初始化

我这边在new gitment 的时候不填id评论没办法初始化,看了老哥的代码发现也没填但是能正常评论,想了解一下是怎么解决的。

配置read_more_btn选项没有任何变化

配置read_more_btn选项没有任何变化

_config.yml

menu:
  Home: /
  Archives: /archives

# gitment
gitment: false
gitment_owner:
gitment_repo:
gitment_client_id:
gitment_client_secret:

# gitalk
gitalk: false
gitalk_owner:
gitalk_admin: []
gitalk_repo:
gitalk_client_id:
gitalk_client_secret:

# valine comment
valine: false
leancloud_id:
leancloud_key:

# disqus comment
disqus: false
disqus_shortname:

# google analytics
googleTrackId:

# baidu analytics
baiduTrackId:

# whether to show read more button when showing article in excerpt in main page
read_more_btn: true

主页摘要问题

可否在 config 中增加一个摘要的固定长度,实现固定长度摘要

重构

部分CSS代码比较混乱,待重构。

Add static frontpage

Is it possible to add a static homepage and move the articles to www.domain.com/blog/?
Thanks!

EDIT: Can be closed, I found out how it works. Just edit the main _config.yaml and change the URL for the blog to e.g. /blog; then add an index.md file to the source folder.

归档页字体,间距问题

看你的博客 感觉归档页码字体,间距感觉不是很好。我以前看好像不像这样。。
运行环境 Chrome + MacOS

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.