forked from hexojs/site
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
613 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
'use strict'; | ||
|
||
var gulp = require('gulp'); | ||
var $ = require('gulp-load-plugins')(); | ||
|
||
var htmlMinifierOptions = { | ||
removeComments: true, | ||
collapseWhitespace: true, | ||
collapseBooleanAttributes: true, | ||
removeScriptTypeAttributes: true, | ||
removeStyleLinkTypeAttributes: true, | ||
removeOptionalTags: true, | ||
minifyJS: true, | ||
minifyCSS: true | ||
}; | ||
|
||
gulp.task('useref', function(){ | ||
var assets = $.useref.assets({ | ||
searchPath: 'public' | ||
}); | ||
|
||
return gulp.src('public/**/*.html') | ||
.pipe(assets) | ||
.pipe($.if('*.css', $.minifyCss())) | ||
.pipe($.if('*.js', $.uglify())) | ||
.pipe($.rev()) | ||
.pipe(assets.restore()) | ||
.pipe($.useref()) | ||
.pipe($.revReplace({ | ||
prefix: '/' | ||
})) | ||
.pipe($.if('*.html', $.htmlMinifier(htmlMinifierOptions))) | ||
.pipe(gulp.dest('public')); | ||
}); | ||
|
||
gulp.task('default', ['useref']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ layout: plugins | |
title: Plugins | ||
data: plugins | ||
partial: plugin | ||
comments: false | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ layout: plugins | |
title: Themes | ||
data: themes | ||
partial: theme | ||
comments: false | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
title: 文章 | ||
--- | ||
## 建立文章 | ||
|
||
## 發佈草稿 | ||
|
||
## 渲染 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
title: 渲染 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<nav id="mobile-nav"> | ||
<div id="mobile-nav-inner"> | ||
<ul id="mobile-nav-list"> | ||
{{ header_menu('mobile-nav') }} | ||
<li class="mobile-nav-item"> | ||
<a href="https://github.com/{{ config.github }}" class="mobile-nav-link" rel="external" target="_blank">GitHub</a> | ||
</li> | ||
</ul> | ||
{% if page.layout == 'page' %} | ||
{{ doc_sidebar('mobile-nav') }} | ||
{% endif %} | ||
</div> | ||
<div id="mobile-lang-select-wrap"> | ||
<span id="mobile-lang-select-label"><i class="fa fa-globe"></i><span>{{ site.data.languages[page.lang] }}</span></span> | ||
<select id="mobile-lang-select" data-canonical="{{ canonical_path_for_nav() }}"> | ||
{% for lang in site.data.languages %} | ||
<option value="{{ loop.key }}"{% if page.lang === loop.key %} selected{% endif %}>{{ lang }}</option> | ||
{% endfor %} | ||
</select> | ||
</div> | ||
</nav> |
Oops, something went wrong.