iTimeTraveler / hexo-theme-hiker

An attractive theme for Hexo. called "Hiker", short for "HikerNews".
https://itimetraveler.github.io/hexo-theme-hiker/
MIT License
368 stars 85 forks source link

使用中碰到的几个问题。 #40

Open navono opened 6 years ago

navono commented 6 years ago

你好。昨天偶尔在主题界面逛了下,突然发现了你这个主题,这个主题非常棒!也是我想要的。 今天早上就试了下。这是站点地址:http://codingeek.me/

按照你的步骤,我先是在主页的_config.yml的theme换成: theme: hiker。 我原先用的是next。

然后我就直接push。整体上样子是有了。但是发现了几个小问题。 第一个就是语言的问题。我尝试在主页的language下改成zh-cn,更新后好像也没用。 第二个问题是主页显示的问题。也就是一篇文章就显示一部分,后面有个readmore,就跟你给出的示例网站一样。但是在我这就把所有的文字都显示出来了,显得很乱。

第三个问题是,其他的子页面,比如“分类”和“标签”,需要修改什么才能显示吗?目前无法显示。“关于”和“存档”是显示正确的,存档中只是文字不是汉字。这个应该和第一个问题相关。

下面是主页中_config.yml的内容:

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

# Site
title: Pingeek
subtitle: Living,then coding.
description: 凡所有相,皆是虚妄。
author: Pingeek
language: zh-cn
timezone:

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://codingeek.me
root: /
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: :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: true
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: 10
pagination_dir: page

#plugins:
#- hexo-generator-cname

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
#theme: landscape
# theme: next
theme: hiker

favicon: /favicon.ico
avatar: /uploads/avatar.jpg
disqus_shortname: navono
since: 2017

feed:
  type: atom
  path: atom.xml
  limit: 20

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type: git
  repo: https://github.com/navono/navono.github.io.git
  branch: master

下面是主题下的_config.yml:

# ---------------------------------------------------------------
# Site Information Settings
# ---------------------------------------------------------------

# Header Menu
menu:
  Home: /
  Archives: archives
  Categories: categories
  Tags: tags
  About: about
rss: /atom.xml

since: 2013

# Set default keywords (Use a comma to separate)
keywords: ""

# Put your favicon.ico or avatar.jpg into `hexo-site/themes/hiker/source/` directory.
avatar: 
  enable: true
  border: true
  width: 124
  height: 124
  top: 0
  url: css/images/mylogo.jpg

# Homepage
# eg. home_background_image: [css/images/home-bg.jpg, http://t.cn/RMbvEza]
home_background_image:
  enable: true
  rolling: true
  url: [css/images/home-bg.jpg, css/images/sample.jpg, https://source.unsplash.com/collection/954550/1920x1080]

home_logo_image:
  enable: false
  border: false
  url: css/images/homelogo.jpg

# AboutPage background
about_big_image: css/images/pose.jpg

# Archive pagination
archive_pagination: true

# Post Article's Content
post_catalog:
  enable: true

# Content
fancybox: true

# Sidebar
sidebar: right
widgets:
- social
- category
- tag
- tagcloud
- archive
- recent_posts

# Social Links
# Key is the name of FontAwsome icon.
# Value is the target link (E.g. GitHub: https://github.com/iTimeTraveler)
social:
  Github: https://github.com/navono
  Weibo: http://www.yoursite.com
  Twitter: 
  Facebook: 
  Google-plus: 
  Instagram: 
  Pinterest: 
  Flickr: 
  email:

# Search
search:
    insight: true # you need to install `hexo-generator-json-content` before using Insight Search
    swiftype: # enter swiftype install key here
    baidu: false # you need to disable other search engines to use Baidu search, options: true, false

# comment ShortName, you can choose only ONE to display.
gentie_productKey: #your-gentie-product-key
duoshuo_shortname: 
disqus_shortname: iTimeTraveler

# Code Highlight theme
# Available value:
#    default | normal | night | night eighties | night blue | night bright
# https://github.com/chriskempson/tomorrow-theme
highlight_theme: default

# Article theme color
# Available value:
#    random | orange | blue | red | green | black
theme_color: random

# display widgets at the bottom of index pages (pagination == 2)
index_widgets:
# - category
# - tagcloud
# - archive

# widget behavior
archive_type: 'monthly'
show_count: true

# Google Webmaster tools verification setting
# See: https://www.google.com/webmasters/
google_site_verification:
baidu_site_verification:
qihu_site_verification:

# Miscellaneous
google_analytics:
gauges_analytics:
baidu_analytics:
tencent_analytics:
twitter:
google_plus:
fb_admins:
fb_app_id:

# Facebook SDK Support.
# https://github.com/iissnan/hexo-theme-next/pull/410
facebook_sdk:
  enable: false
  app_id:       #<app_id>
  fb_admin:     #<user_id>
  like_button:  #true
  webmaster:    #true

# CNZZ count
cnzz_siteid: 1260716016

# busuanzi count
# http://busuanzi.ibruce.info/
show_busuanzi_view_counts: true

# donation button
donate:
    enable: true
    message: '如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!'
    wechatImage: 
    alipayImage: 

谢谢。

iTimeTraveler commented 6 years ago

Hello, @navono . 首先给你一个我的Demo站点的源目录作参考: https://github.com/iTimeTraveler/hexo-theme-hiero/tree/site-source

第一个语言问题,你改成zh-CN试试。其他两个参考我上面这个源目录应该就可以,你对比下试试吧

navono commented 6 years ago

@iTimeTraveler 好的。我试试。谢谢。

navono commented 6 years ago

@iTimeTraveler 好像不行。更改太大。貌似还原到next也出错了。囧。。。。

zzhiren commented 6 years ago

@navono 是呀,哪个readmore我也弄不出来,你弄好了吗

navono commented 6 years ago

@Zzhiren 我现在没用这个主题了。