mirror of https://gitlab.com/curben/blog
fix(theme): check dependencies
This commit is contained in:
parent
415a7591c8
commit
93c5ad783e
|
@ -104,5 +104,5 @@ theme_config:
|
|||
Eepsite: http://mdleom.i2p
|
||||
'Eepsite (B32)': http://ggucqf2jmtfxcw7us5sts3x7u2qljseocfzlhzebfpihkyvhcqfa.b32.i2p
|
||||
|
||||
# Load forkawesome icons? See the links option below.
|
||||
# Load forkawesome icons?
|
||||
icons: false
|
||||
|
|
|
@ -8,3 +8,24 @@ Chameleon is a fork of [Typing](https://github.com/geekplux/hexo-theme-typing) t
|
|||
- Add a [Copy](https://clipboardjs.com/) button to each code block.
|
||||
- Removed jQuery, fancyBox, web analytics, comment plugins, donation links and [typo.css](https://github.com/sofish/typo.css).
|
||||
- Homepage shows index of posts (same as /archives).
|
||||
|
||||
## Options
|
||||
|
||||
Configure this theme from your **site**'s configuration:
|
||||
|
||||
``` yml
|
||||
# _config.yml
|
||||
theme_config:
|
||||
# Header menu
|
||||
menu:
|
||||
Home: /
|
||||
Archives: /archives/
|
||||
Feed: /atom.xml
|
||||
|
||||
# Footer menu
|
||||
footer:
|
||||
GitLab: https://gitlab.com/curben/blog
|
||||
|
||||
# Load forkawesome icons?
|
||||
icons: false
|
||||
```
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</nav>
|
||||
<%/* Nav menu for mobile */%>
|
||||
<nav class="mobile-nav">
|
||||
<h1 class="site-title"><a href="<%- url_for(theme.menu['Home']) %>"><%= config.title %></a></h1>
|
||||
<h1 class="site-title"><a href="<%- config.root %>"><%= config.title %></a></h1>
|
||||
<ul class="mobile-nav-menu">
|
||||
<label for="mobile-menu-toggle"><a class="no-underline" id="menu-button">☰</a></label>
|
||||
<input id="mobile-menu-toggle" type="checkbox"/>
|
||||
|
|
|
@ -9,6 +9,15 @@
|
|||
* incompatible with hexo-yam
|
||||
*/
|
||||
|
||||
const deps = ['autoprefixer', 'postcss', 'postcss-normalize']
|
||||
deps.forEach(dep => {
|
||||
try {
|
||||
require.resolve(dep)
|
||||
} catch (err) {
|
||||
throw new Error(`Missing "${dep}" dependency. Please install it by running "npm install ${dep}".`)
|
||||
}
|
||||
})
|
||||
|
||||
const autoprefixer = require('autoprefixer')
|
||||
const normalize = require('postcss-normalize')
|
||||
const postcss = require('postcss')
|
||||
|
|
Loading…
Reference in New Issue