Add menubar and search function to hexo blog
Add Menubar
In the theme folder, we can find the following scripts in the _config.yml file.
# ---------------------------------------------------------------
# Menu Settings
# ---------------------------------------------------------------
# When running the site in a subdirectory (e.g. domain.tld/blog), remove the leading slash from link value (/archives -> archives).
# Usage: `Key: /link/ || icon`
# Key is the name of menu item. If translate for this menu will find in languages - this translate will be loaded; if not - Key name will be used. Key is case-senstive.
# Value before `||` delimeter is the target link.
# Value after `||` delimeter is the name of FontAwesome icon. If icon (with or without delimeter) is not specified, question icon will be loaded.
menu:
home: / || home
about: /about/ || user
tags: /tags/ || tags
categories: /categories/ || th
archives: /archives/ || archive
#schedule: /schedule/ || calendar
#sitemap: /sitemap.xml || sitemap
#commonweal: /404/ || heartbeat
# Enable/Disable menu icons.
menu_icons:
enable: true
The default menubars are home and archives. I want to add tags, categories and about to menubar. The problems appear when I only note off the options in the above scripts.
this site method two to cite website
Actually, we should add folder with commond hexo new page menubar_name
, then corresponding folders will appear in the source folder which is the site configure source folder. Then add configure information in the correspongding index.md.
Take tags for example.
$ hexo new page tags
We will see follow information in index.md.
---
title: tags
date: 2018-09-09 13:34:49
---
Then we add type: "tags"
to the index.md
---
title: tags
date: 2018-09-09 13:34:49
type: "tags"
---
Similar methods are used to add categories and about to menubar.
Add local search function to menubar
- install
hexo-generator-search
, hexo-theme-next search function depend on this package.
$ npm install hexo-generator-search --save
- active the local search configure in theme configure file
_config.yml
.
# Local search
# Dependencies: https://github.com/flashlab/hexo-generator-search
local_search:
enable: true #false modified by hubery lee @2018/9/9
# if auto, trigger search by changing input
# if manual, trigger search by pressing enter key or search button
trigger: auto
# show top n results per article, show all results by setting to -1
top_n_per_article: 1
相關推薦
Add menubar and search function to hexo blog
Add Menubar In the theme folder, we can find the following scripts in the _config.yml file. # ---------------------------------
211. Add and Search Word - Data structure design
new have ret oop you print recursive expr ng- https://leetcode.com/problems/add-and-search-word-data-structure-design/#/description Des
leetcode 211. Add and Search Word - Data structure design
cti rsquo .com dict esc sum color pos nsis Design a data structure that supports the following two operations: void addWord(word) bool
單詞的添加與查找 · Add and Search Word
-s 復雜度 OS dex 代碼 time string 數據結構 number [抄題]: 設計一個包含下面兩個操作的數據結構:addWord(word), search(word) addWord(word)會在數據結構中添加一個單詞。而search(word)則支持普
[Rust] Pass a JavaScript Function to WebAssembly and Invoke it from Rust
his scrip wrap pro mis document java env load In some cases it’s useful to be able to invoke a JavaScript function inside Rust. Thi
How To Add Google Apps and ARM Support to Genymotion v2.0+
How To Add Google Apps and ARM Support to Genymotion v2.0+ Original Source: [GUIDE] Genymotion | Installing ARM Translation and GApps - XDA-Develop
211 Add and Search Word - Data structure design--- back tracking, map, set 待續 trie
題意: 設計個字典查詢系統, 有 add 和search 兩種操作, add 是加入單詞到字典裡, search 時 可以用 點號萬用字元 ".", 點號可以匹配一個字母。 分析: 當search 時為 萬用字元時, 如果直接用back tracking產生 a-z, 比如 有7個點號, 就得生成 
LeetCode: Add and Search Word
題目描述 Design a data structure that supports the following two operations: void addWord(word) bool sea
211. Add and Search Word
Description Design a data structure that supports the following two operations: void addWord(word) bool search(word) search(word) c
211.Add and Search Word
該題有兩種思路: one:利用Trie樹實現: class WordDictionary { private class Trie { public boolean isWord; public Trie[] chil
Given two strings s and t, write a function to determine if t is an anagram of s.
Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = "anagram", t = "nagaram", return tru
[LeetCode] Add and Search Word
Design a data structure that supports the following two operations: void addWord(word) bool search(word) search(word) can search a literal word or a
[Swift]LeetCode211. 新增與搜尋單詞 - 資料結構設計 | Add and Search Word - Data structure design
Design a data structure that supports the following two operations: void addWord(word) bool search(word) search(word) can search a literal word or a r
[Swift]LeetCode211. 添加與搜索單詞 - 數據結構設計 | Add and Search Word - Data structure design
func art sel node fix each 表達 reac character Design a data structure that supports the following two operations: void addWord(word) boo
Add and Verify Domains to Use With Workmail
Amazon Web Services is Hiring. Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring So
Add role-based access and password recovery to your PHP application
In Part 1, I explained the basics of the Passport API and walked you through the process of integrating Passport with a PHP applicati
Two Wrongs Can Make a Right (and Are Difficult to Fix)
write work visible fun mar pop sig per cati Two Wrongs Can Make a Right (and Are Difficult to Fix) Allan Kelly CODE NEVER LIE
Codeforces Round #435 (Div. 2) E. Mahmoud and Ehab and the function(預處理+二分)
class [1] can 行處理 long 個數 分享 amp abs 題目鏈接:點我點我 題意:公式:,給出n個數,從a[1]到a[n],和m個數(b數組),然後從b數組裏挑出連續的n個數(也就m-n+1中選擇),按公式計算,使得f最小, 還有q次對a數組的操作(某
CodeForces 862E Mahmoud and Ehab and the function 暴力,二分
push_back fin style name https img print ret esp CodeForces 862E 題意: 給出長度為 n 的數組 a[] 和長度為 m 的數組 b[],有 q 個詢問,每次詢問把區間標號 [l,r] 的 a[] 加