Silentink blog

默墨的小小筆記園地


  • 首頁

  • 關於

  • 標籤4

  • 分類6

  • 歸檔23

  • 網站地圖

  • 名博

  • 搜尋

Welcome to my Blog!

發表於 2017-05-27 | 更新於: 2018-12-12 | | 閱讀次數:

哈囉,如果沒意外這篇會置頂XD
歡迎來到我的部落格,這裡會存放一下學習心得之類的
感謝你的到來~~

本文地址: https://david6686.github.io/blog/silentink/13858/

音樂播放器測試

發表於 2018-03-19 | 更新於: 2018-12-12 | 分類於 blog建構誌 | | 閱讀次數:
測試音樂播放器
閱讀全文 »

hexo-next更改捐贈按鈕樣式

發表於 2018-03-08 | 更新於: 2018-03-08 | 分類於 blog建構誌 | | 閱讀次數:

原因

原本的Reward的按鈕在字太長的時候會不好看
然後顏色我也不喜歡

第一方案(失敗)

原本想說可以使用next功能中
部落格/themes/next/source/css/_custom/custom.styl做自定義修改

可以使用瀏覽器的元件追蹤功能來看
(詳情hexo 自定義頁面樣式)
.site-author.motion-element

但是…

閱讀全文 »

hexo-next 使用hexo-abbrlink 製作永久連結

發表於 2018-03-03 | 更新於: 2018-03-03 | 分類於 blog建構誌 | | 閱讀次數:

原因

hexo預設永久連結是依照日期,但是這個很容易改動
又不希望永久連結內使用文章標題(因為是中文也有可能改動)

閱讀全文 »

hexo-next 使用hexo-renderer-markdown-it

發表於 2018-03-03 | 更新於: 2018-03-04 | 分類於 blog建構誌 | | 閱讀次數:

為了讓jupyternote轉換後的markdown可以在部落格使用
目前hexo的markdown引擎已經換成了hexo-renderer-markdown-it

之前使用jupyternote轉成markdown後的文章

之前的文章並沒有寫的很清楚,這次來完整紀錄一下

閱讀全文 »

hexo-next新增部落格總字數統計數量在網站底部

發表於 2018-03-02 | 更新於: 2018-03-03 | 分類於 blog建構誌 | | 閱讀次數:

套件使用

hexo-wordcount

方法

主要是使用hexo-wordcount的功能

  1. 進入 部落格資料夾/themes/next/layout/_partials/footer.swig檔案內
  2. 我是直接新增一行來顯示也就是在theme-info的code底下再新增以下code
1
2
3
4
5
<div>
<font>總字數統計: </font>
<span class="post-count">{{ totalcount(site, '0,0') }}</span>
<font> 字</font>
</div>

Reference

hexo-wordcount

本文地址: https://david6686.github.io/blog/silentink/42691/

hexo-next新增網站訪問人數統計

發表於 2018-03-02 | 更新於: 2018-03-03 | 分類於 blog建構誌 | | 閱讀次數:

記錄一下使用

方法

修改主題配置

在主題_config.yml中找到busuanzi_count
把其中的enable設為true

模式

有模式可以設定

pv的方法

一個用戶連續點擊n篇文章,記錄n次訪問量

1
2
3
4
5
#我沒有使用pv方法  所以為false
# custom pv span for the whole site
site_pv: false
site_pv_header: <i class="fa fa-eye"></i>
site_pv_footer:

uv的方法

一個用戶連續點擊n篇文章,記錄1次訪問量

1
2
3
4
5
6
#我使用此方法所以為true
#<i class="fa fa-user"> 是符號
#custom uv span for the whole site
site_uv: true
site_uv_header: <i class="fa fa-user"></i>本站總訪問數
site_uv_footer: 人次

Reference

hexo-next文檔

本文地址: https://david6686.github.io/blog/silentink/5343/

hexo_next文章置頂

發表於 2018-03-02 | 更新於: 2018-03-03 | 分類於 blog建構誌 | | 閱讀次數:

使用套件

hexo-generator-index-pin-top

方法

  1. npm uninstall hexo-generator-index --save
  2. npm install hexo-generator-index-pin-top --save
  3. 在要置頂的文章上使用top: True(這樣就會置頂了)
  4. (Options)Next的小功能,在置頂文章上加sticky: 100 (其實hexo-next寫這個sticky是會有個依照sticky大小做排序的功能,應該要能置頂,但好像有bug所以這樣子結合方法)這樣就會有小別針在置頂文章上面了

Reference

hexo-generator-index-pin-top
hexo-next 置頂文章 issue
hexo 置頂問題文章

本文地址: https://david6686.github.io/blog/silentink/13136/

hexo-next無法備份themes/next到遠端倉庫問題

發表於 2018-03-01 | 更新於: 2018-03-03 | 分類於 blog建構誌 | | 閱讀次數:

問題

因為hexo_next本身是子倉庫的關係,所以沒辦法直接push到自己的遠端倉庫

狀況與解決方案

  1. 如果next內並沒有做客製化,單純的想要備份next的配置文檔的話(_config.yml) 可以使用hexo資料檔案的技術,詳情參考。
  2. 如果有客製化next的話,需要做git的submodule來再開一個repository來進行備份
閱讀全文 »

更改hexo-renderer

發表於 2017-10-02 | 更新於: 2018-03-03 | 分類於 blog建構誌 | | 閱讀次數:

原因

因為無法用hexo原本的hexo-renderer-marked去顯示html的部分
所以改用hexo-renderer-markdown-it

方案

之前可能設置錯誤,有時render失敗,目前採用下面的配置就穩定了

在hexo的_config.yml加上以下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
markdown:
render:
html: true # Doesn't escape HTML content so the tags will appear as html.(開啟好讓dataframe的表格能夠使用)
xhtmlOut: false # Parser will not produce XHTML compliant code.
breaks: true # Parser produces `<br>` tags every time there is a line break in the source document.
linkify: false # Returns text links as text.
typographer: true # Substitution of common typographical elements will take place.
quotes: '“”‘’' # "double" will be turned into “single”
# 'single' will be turned into ‘single’
plugins:
#以下啟用套件 需另外下載
#+ markdown-it-abbr
#+ markdown-it-checkbox
#+ markdown-it-emoji
#+ markdown-it-footnote
#+ markdown-it-ins
#+ markdown-it-sub
#+ markdown-it-sup
anchors:
level: 2 # Minimum level for ID creation. (Ex. h2 to h6)
collisionSuffix: 'v' # A suffix that is prepended to the number given if the ID is repeated.
permalink: true # If true, creates an anchor tag with a permalink besides the heading.
permalinkClass: header-anchor # Class used for the permalink anchor tag.
permalinkSymbol: ¶ # The symbol used to make the permalink.

Reference

hexo-renderer-marked
hexo-renderer-markdown-it
設置參考

本文地址: https://david6686.github.io/blog/silentink/18958/

123
Silentink

Silentink

隨筆隨寫

23 文章
6 分類
4 標籤
RSS
GitHub FB Page StackOverflow Linkedin Gitlab Telegram
友情連結
  • kaiyeee blog
  • sappy5678 blog
  • Henry Li's blog
0%
© 2017 — 2018 Silentink
由 Hexo 強力驅動
|
主題 — NexT.Pisces v6.0.5