jekyll starter blog
1.0.0
靜態產生的網站專為想要撰寫託管在靜態託管中的部落格文章的開發人員而設計(例如:Github Pages)。
示範網站:https://sutanlab.js.org/jekyll-starter-blog
npm install
以安裝所有 npm 和捆綁程式依賴項_posts
中的範例帖子,查看分配類別和標籤的範例去編輯_config.yml
# Site settings
name : Sutanlab Blog
title : Gading Nst. - Coder
description : A blog and journal about Gading Nst, Junior Developer
baseurl : " /jekyll-starter-blog " # the subpath for your site default is ""
url : " https://sutanlab.js.org " # the base hostname & protocol in your domain (e.g: https://sutanlab.github.io)
# Author Setting
username : Gading Nst.
user_description : Learner, Coder & Coffee Maniac
user_title : Welcome to My Blog Site
avatar_url : /jekyll-starter-blog/assets/img/sutan.jpeg
email : [email protected]
github_username : sutanlab
disqus_username : sutanlab
facebook_username : sgnzst
instagram_username : sutan_gnst
twitter_username : sutan_gnst
medium_username : sutan.gnst
...
去編輯src/sass
資料夾中的_variables.scss
// theme color
$main : #2c3e50 ;
$sidemenu : #242f3a ;
$hover : darken ( $main , 50 % );
$sec : #FFFFFF ;
$lightGray : #F2F2F2 ;
$texts : #333333 ;
$colorcode : #3085F4 ;
$loader-color : #FFFFFF ;
/* *
* adjust with your disqus theme
* if your disqus theme is dark, the color should be darken.
* if your disqus theme is light, the color should be lighten
*/
$comment-theme : #304165 ;
// responsive cut
$cut : 37.5 rem ;
post.sh
命令建立新帖子您只需按照命令./post -c Post Title
即可建立新帖子。新貼文將以.md
格式在_posts
中建立。當您建立新帖子時,您需要在 front-matter 中填寫帖子信息,如下示例:
---
layout : post
title : Post Title
date : 2019-05-02 16:32:44
image : /assets/img/blog/post-image.png
description : First steps to use this template
tags :
- jekyll
- template
categories :
- I love Jekyll
twitter_text : How to install and use this template
keywords : jekyll, template, my post
---
對於其他./post.sh
命令:
./post -h
輸出指令./post -c $TITLE
建立帖子./post -d $TITLE
建立草稿帖子./post -p $TITLE
將草稿發布/升級為帖子請記住在部署網站之前執行npm run build
來編譯 sass、js 和建置網站文件
npm run deploy
用於部署到 github 頁面上的其他分支
或者您可以使用./deploy.sh
進行自動化部署
執行npm start
或bundle exec jekyll server --host=$IP_ADDR --port=$PORT
版權所有 © 2019 Gading Gading Fadhillah Nasution