Code Monkey home page Code Monkey logo

hexo-theme-replica's Introduction

Replica LICENSE MIT

Github style replication for hexo theme.

If you are using Gatsby, kindly check https://github.com/sabrinaluo/gatsby-theme-replica

Because we love octocat! 💕 Click here to view the demo site

Issues & Contributions are welcome! 😛

Version

v1.0

Github UI before 2017, which uses the grey navbar

v2.0 (in progress) lack of maintenance

Github UI in 2017, which uses the black navbar

Setup

Install

git clone [email protected]:sabrinaluo/hexo-theme-replica.git themes/replica

or

git clone https://github.com/sabrinaluo/hexo-theme-replica.git themes/replica

Configure

Set theme: replica in _config.yml (the one in your root folder)

PLEASE NOTE Modifying blog_root/themes/replica/_config.yml directly is NOT recommended.
It's suggested to configure your site through blog_root/_config.yml (root folder).

Here is a sample of blog_root/_config.yml

CLICK ME

# Hexo Configuration
## Docs: http://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
title: My Blog
description: My Blog Description
author: HiiTea
language: zh-CN
timezone: Asia/Shanghai
favicon: https://assets-cdn.github.com/favicon.ico

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://sabrinaluo.com/tech
root: /tech/
permalink: :year/:month/:day/:title/
permalink_defaults:

# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# Writing
new_post_name: :year:month:day-:title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: false
  tab_replace:

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss

# Pagination
## Set per_page to 0 to disable pagination
per_page: 0
pagination_dir: page

# Extensions
## Plugins: http://hexo.io/plugins/
## Themes: http://hexo.io/themes/
theme: replica

# Google Analytics
ga: # GA code UA-XXXXXXXX-X

#marked setting for markdown
marked:
  gfm: true
  pedantic: false
  sanitize: false
  tables: true
  breaks: true
  smartLists: true
  smartypants: true

gcs: # GOOGLE CUSTOM SEARCH
baidutongji: # BAIDU TONGJI CODE
disqus: # DISQUS ID

location: Hong Kong
email: [email protected]

avatar: https://avatars2.githubusercontent.com/u/5300359?v=4&s=460
social:
  github: https://github.com/sabrinaluo
  weibo: http://weibo.com/206663121
  linkedin:

# flagcounter
flagcounter_href: # https://info.flagcounter.com/xxxx
flagcounter_img_src: # https://s01.flagcounter.com/xxxx

Update

cd themes/replica
git pull

In case you want the old version with grey navbar

cd themes/replica
git checkout 1.0 # AKA `git checkout -b 1.0 origin/1.0`

Available Widgets

多说 (Duoshuo stopped the service since June, 2017)
百度统计
Disqus
Google Analytics
Google Custom Search Engine1

FAQ

Q: How can I use category and tag?

A: Create below files under source folder:

blog_root/source/categories/index.md:

---
title: categories
date: 2016-01-21 18:46:15
---

blog_root/source/tags/index.md:

---
title: tags
date: 2016-01-21 18:45:55
---

License

The MIT License2

Copyright (c) 2015-2019 Hiitea [email protected]

Buy me coffee 😋

BTC: 19U6USzi7WaFmY3DTkgn67EzYpTqZPNwRG
image

Coffee Fund

Footnotes

  1. https://cse.google.com/

  2. https://opensource.org/licenses/MIT

hexo-theme-replica's People

Contributors

debugtalk avatar harvies avatar orisonchan avatar sabrinaluo avatar wangcansunking avatar

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

hexo-theme-replica's Issues

頁面切換時的問題

自動解析成index.html時 都是在根目錄
目前只能手動去調整才能切換頁面,但這樣每更新文章時都會要重新調整
螢幕快照 2021-11-21 下午6 01 12

手動改後切換時還是怪怪的
附上我的網站給大家試試QQ,我功力太弱還無法pr
https://chiderlin.github.io/

另外archives可以有做成按照年份分嗎XDD像下面這樣...
螢幕快照 2021-11-21 下午6 11 31

CSS IN DISORDER

I really like this theme, but when I use it, I found it's css was in disorder. just like this
image
And I tried to fix it in your main.css by copy online code from your blog 小白妹妹写代码,but it's too hard to finish this work, so would you tell me how to fix this issue,.
Thx.

公式支持

之后会考虑加上latex公式支持嘛?没有公式支持有时候点有难受呀。

Theme v1.0 happened errors

I cloned v1.0 using by git clone -b v1.0 https://github.com/sabrinaluo/hexo-theme-replica.git themes/replica.

And I input a command hexo s in Terminal and opened http://localhost:4000/ on the browser.

Finally, It occurred errors

wechatimg24

I'm 😂
Or I'm just waiting you for completing the v2.0. 💫
Thank you for your contribution. 💖

social 图标在fontawesome中不存在怎么处理

以此提交为例, twitter,facebook,stackoverflow 中的图标在fontawesome可以搜索到并添加成功了
6c4d572

但是 csdn,知乎,简书,博客园等 在fontawesome无法搜索到 所以无法添加该链接, 添加后 hexo s 运行失败因为无法找到icon

Suggestions for concealing some not completed functions

Hello Beauty Programmer,

First, I want to praise you that this theme for HEXO looks stunning and I think you have been spending many time on it.
But I suppose it would be better if you could conceal those functions which have not been completed.

Thanks.

更新版本时.ejs文件出错

ERROR ReferenceError: E:\blog\yumeko11Blog\themes\replica\layout\layout.ejs:7
5| <%- partial('_partial/navbar') %>
6|

7| <%- body %>
8|


9| <%- partial('_partial/footer') %>
10| <%- partial('_partial/script') %>

body is not defined
at eval (E:\blog\yumeko11Blog\themes\replica\layout\layout.ejs:21:17)
at layout (E:\blog\yumeko11Blog\node_modules\ejs\lib\ejs.js:682:17)
at _View._compiled (E:\blog\yumeko11Blog\node_modules\hexo\lib\theme\view.js:136:50)
at _View.render (E:\blog\yumeko11Blog\node_modules\hexo\lib\theme\view.js:39:17)
at E:\blog\yumeko11Blog\node_modules\hexo\lib\hexo\index.js:64:21
at tryCatcher (E:\blog\yumeko11Blog\node_modules\bluebird\js\release\util.js:16:23)
at E:\blog\yumeko11Blog\node_modules\bluebird\js\release\method.js:15:34
at RouteStream.read (E:\blog\yumeko11Blog\node_modules\hexo\lib\hexo\router.js:47:5)
at RouteStream.Readable.read (internal/streams/readable.js:462:10)
at resume
(internal/streams/readable.js:958:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
path: 'E:\blog\yumeko11Blog\themes\replica\layout\layout.ejs'

文章过多时排版错误

当我把_post文件删除,然后执行
hexo clean
hexo g
hexo s
浏览器打开显示正确的排版
但是把_post放到正确位置,然后执行
hexo clean
hexo g
hexo s
发现排版就会错误,不知道是不是文章过多导致排版错误
这是hexo g输出的结果:
https://paste.ubuntu.com/p/bPtWV2MkGV/
_post文件夹下文件个数:

chrome71.0.3578.98无痕模式访问localhost:4000

系统配置:

Errors occurred after run 'hexo s'

The Errors

Unhandled rejection TypeError: D:\works\blog\github_pages\themes\replica\layout\index.ejs:1
 >> 1| <%
    2| var posts = page.posts.data;
    3| var oldestPostDate = posts.length ? posts[posts.length - 1].date : {date: moment()};
    4| var startFrom = oldestPostDate.format('MMM D, YYYY');

Cannot read property 'github' of undefined
    at eval (eval at compile (D:\works\blog\github_pages\node_modules\ejs\lib\ejs.js:549:12), <anonymous>:14:27)
    at returnedFn (D:\works\blog\github_pages\node_modules\ejs\lib\ejs.js:580:17)
    at _compiled (D:\works\blog\github_pages\node_modules\hexo\lib\theme\view.js:127:30)
    at View.render (D:\works\blog\github_pages\node_modules\hexo\lib\theme\view.js:29:15)
    at D:\works\blog\github_pages\node_modules\hexo\lib\hexo\index.js:390:25
    at tryCatcher (D:\works\blog\github_pages\node_modules\bluebird\js\release\util.js:16:23)
    at D:\works\blog\github_pages\node_modules\bluebird\js\release\method.js:15:34
    at RouteStream._read (D:\works\blog\github_pages\node_modules\hexo\lib\hexo\router.js:134:3)
    at RouteStream.Readable.read (_stream_readable.js:348:10)
    at resume_ (_stream_readable.js:737:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

Questions

  • Why ?
  • How to fix it ?

配置错误

gsc: # google custom search code

应该是gcs

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.