提交 fbba0bef 编写于 作者: Miykael_xxm's avatar Miykael_xxm 🚴

init

上级
_site
.sass-cache
node_modules
_drafts
\ No newline at end of file
The MIT License (MIT)
Copyright (c) 2016 Willian Justen <willianjustenqui@gmail.com>
http://willianjusten.com.br
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
\ No newline at end of file
⚠️⚠️ This project is not maintained anymore ⚠️⚠️
## Will Jekyll Template - [Demo](https://willianjusten.github.io/will-jekyll-template)
![Screenshot](screenshot.png)
This is a simple and minimalist template for Jekyll designed for developers that want to write blog posts but don't want to care about frontend stuff.
The Theme features:
- Gulp
- Stylus (Jeet, Rupture, Kouto Swiss)
- Smoothscroll
- Live Search
- Offcanvas Menu
- SVG icons
- Very very small and fast!
- Shell Script to create posts
- Tags page
- Series page
- About Me page
- Feed RSS
- Sitemap.xml
- Color Customization
- Info Customization
## Requirements
- This project only works until Node v11-
## Basic Setup
1. [Install Jekyll](http://jekyllrb.com)
2. Fork the [Will Jekyll Template](https://github.com/willianjusten/will-jekyll-template/fork)
3. Clone the repo you just forked.
4. Edit `_config.yml` to personalize your site.
5. Check out the sample posts in `_posts` to see examples for assigning categories and tags, and other YAML data.
6. Edit [this line in the search component](https://github.com/willianjusten/will-jekyll-template/blob/gh-pages/src/js/simpleJekyllSearch.js#L4) to point to your own url.
7. Read the documentation below for further customization pointers and documentation.
8. **Remember to compile your assets files using Gulp!**
## Site and User Settings
You have to fill some informations on `_config.yml` to customize your site.
```
# Site settings
description: A blog about lorem ipsum dolor sit amet
baseurl: "" # the subpath of your site, e.g. /blog/
url: "http://localhost:3000" # the base hostname & protocol for your site
# User settings
username: Lorem Ipsum
user_description: Anon Developer at Lorem Ipsum Dolor
user_title: Anon Developer
email: anon@anon.com
twitter_username: lorem_ipsum
github_username: lorem_ipsum
gplus_username: lorem_ipsum
disqus_username: lorem_ipsum
```
**Don't forget to change your baseurl before build your site!**
## Color customization
All color variables are in `src/styl/variable`. To change the main color, just set the new value at `main` assignment. Another colors are for texts and the code background color.
## Creating posts
You can use the `initpost.sh` to create your new posts. Just follow the command:
```
./initpost.sh -c Post Title
```
The new file will be created at `_posts` with this format `date-title.md`.
## Front-matter
When you create a new post, you need to fill the post information in the front-matter, follow this example:
```
---
layout: post
title: "How to use"
date: 2015-08-03 03:32:44
image: '/assets/img/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'
---
```
## Running the blog in local
In order to compile the assets and run Jekyll on local you need to follow those steps:
- Install [NodeJS](https://nodejs.org/)
- Run `npm install`
- Run `gulp`
## Questions
Having a problem getting something to work or want to know why I setup something in a certain way? Ping me on Twitter [@willian_justen](https://twitter.com/willian_justen) or file a [GitHub Issue](https://github.com/willianjusten/will-jekyll-template/issues/new).
## Donation
If you liked my work, buy me a coffee <3
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UTMFZUHX6EUGE)
## License
This theme is free and open source software, distributed under the The MIT License. So feel free to use this Jekyll theme on your site without linking back to me or using a disclaimer.
If you’d like to give me credit somewhere on your blog or tweet a shout out to [@willian_justen](https://twitter.com/willian_justen), that would be pretty sweet.
# Site settings
title: A blog about lorem ipsum dolor sit amet
description: A blog about lorem ipsum dolor sit amet
baseurl: "/mysite" # the subpath of your site, e.g. /blog
url: " " # the base hostname & protocol for your site e.g. http://willianjusten.com.br
# User settings
username: '你好,我是<熊佳牧>'
user_description: '欢迎来到我的个人博客'
user_title: 野生产品经理
email: mail@csdn.net
# Build settings
markdown: kramdown
highlighter: rouge
permalink: /:title/
# html minify
compress_html:
clippings: all
comments: all
endings: []
profile: false
# Links to include in menu navigation
# For external links add external: true
links:
- title: '首页'
url: /mysite/
- title: '专栏'
url: /mysite/series
- title: '关键词'
url: /mysite/tags
- title: '关于我们'
url: /mysite/about
# exclude my node related stuff
exclude: ['package.json', 'src', 'node_modules']
<section class="author" itemprop="author">
<div class="details" itemscope itemtype="http://schema.org/Person">
<img itemprop="image" class="img-rounded" src="{{site.baseurl}}/assets/img/blog-author.jpg" alt="{{site.name}}">
<p class="def">Author</p>
<h3 class="name">
<a itemprop="name" href="https://plus.google.com/{{site.gplus_username}}/posts">{{site.username}}</a>
</h3>
<p class="desc">{{site.user_description}}</p>
<a itemprop="email" class="email" href="mailto:{{site.email}}">{{site.email}}</a>
</div>
</section>
<section class="comments">
<h3>Comments</h3>
<div id="disqus_thread"></div>
</section>
<script type="text/javascript">
var disqus_loaded = false;
function load_disqus()
{
disqus_loaded = true;
var disqus_shortname = '{{site.disqus_username}}';
var disqus_title = '{{page.title.replace("'", "\\'")}}';
var disqus_url = '{{page.url}}';
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
var ldr = document.getElementById('disqus_loader');
};
window.onscroll = function(e) {
if ((window.innerHeight + window.scrollY) >= (document.body.offsetHeight - 800)) {
//hit bottom of page
if (disqus_loaded==false)
load_disqus()
}
};
</script>
<footer>
<p>Made with <a href="http://jekyllrb.com/" target="_blank">Jekyll</a> and <span class="love"></span> by <a href="https://willianjusten.com.br">Willian Justen</a></p>
</footer>
<script src="{{ "/assets/js/main.js" | prepend: site.baseurl }}"></script>
\ No newline at end of file
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description" content="{% if page.description %}{{ page.description | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<!-- Google Authorship Markup -->
<link rel="author" href="https://plus.google.com/{{site.gplus_username}}?rel=author">
<!-- Social: Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@{{site.twitter_username}}">
<meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
<meta name="twitter:description" content="{% if page.description %}{{ page.description | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
{% if page.image %}
<meta property="twitter:image:src" content="{{ site.url }}{{page.image }}">
{% else %}
<meta property="twitter:image:src" content="{{ "/assets/img/blog-image.png" | prepend: site.baseurl | prepend: site.url }}">
{% endif %}
<!-- Social: Facebook / Open Graph -->
<meta property="og:url" content="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<meta property="og:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
{% if page.image %}
<meta property="og:image" content="{{ site.url }}{{page.image }}">
{% else %}
<meta property="og:image" content="{{ "/assets/img/blog-image.png" | prepend: site.baseurl | prepend: site.url }}">
{% endif %}
<meta property="og:description" content="{% if page.description %}{{ page.description | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<meta property="og:site_name" content="{{ site.title }}">
<!-- Social: Google+ / Schema.org -->
<meta itemprop="name" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}"/>
<meta itemprop="description" content="{% if page.description %}{{ page.description | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<meta itemprop="image" content="{{ "/assets/img/blog-image.png" | prepend: site.baseurl | prepend: site.url }}"/>
<!-- Favicon -->
<link rel="shortcut icon" href="{{site.baseurl}}/assets/img/icons/favicon.ico" type="image/x-icon" />
<!-- Apple Touch Icons -->
<link rel="apple-touch-icon" href="{{site.baseurl}}/assets/img/icons/apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="57x57" href="{{site.baseurl}}/assets/img/icons/apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon" sizes="72x72" href="{{site.baseurl}}/assets/img/icons/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon" sizes="114x114" href="{{site.baseurl}}/assets/img/icons/apple-touch-icon-114x114.png" />
<link rel="apple-touch-icon" sizes="144x144" href="{{site.baseurl}}/assets/img/icons/apple-touch-icon-144x144.png" />
<link rel="apple-touch-icon" sizes="60x60" href="{{site.baseurl}}/assets/img/icons/apple-touch-icon-60x60.png" />
<link rel="apple-touch-icon" sizes="120x120" href="{{site.baseurl}}/assets/img/icons/apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" sizes="76x76" href="{{site.baseurl}}/assets/img/icons/apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" sizes="152x152" href="{{site.baseurl}}/assets/img/icons/apple-touch-icon-152x152.png" />
<!-- Windows 8 Tile Icons -->
<meta name="application-name" content="{{site.username}} Blog">
<meta name="msapplication-TileColor" content="#0562DC">
<meta name="msapplication-square70x70logo" content="smalltile.png" />
<meta name="msapplication-square150x150logo" content="mediumtile.png" />
<meta name="msapplication-wide310x150logo" content="widetile.png" />
<meta name="msapplication-square310x310logo" content="largetile.png" />
<!-- Android Lolipop Theme Color -->
<meta name="theme-color" content="#0562DC">
<link rel="stylesheet" href="{{ "/assets/css/main.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
</head>
<header class="header-site" role="banner">
<div class="content">
<h1>
<span class="site-title">{{site.username}}</span>
<span class="site-description">{{site.user_title}}</span>
</h1>
<div class="icons-home">
<a aria-label="Send email" href="mailto:{{site.email}}"><svg class="icon icon-email"><use xlink:href="#icon-email"></use></svg></a>
<!-- <a aria-label="My Twitter" target="_blank" href="https://twitter.com/{{site.twitter_username}}"><svg class="icon icon-twitter"><use xlink:href="#icon-twitter"></use></svg></a>
<a aria-label="My Google Plus" target="_blank" href="https://plus.google.com/{{site.gplus_username}}/posts"><svg class="icon icon-google-plus"><use xlink:href="#icon-google-plus"></use></svg></a>
<a aria-label="My Github" target="_blank" href="https://github.com/{{site.github_username}}"><svg class="icon icon-github-alt"><use xlink:href="#icon-github-alt"></use></svg></a>
<a aria-label="Use the RSS to get updated" target="_blank" href="{{ "/feed.xml" | prepend: site.baseurl }}"><svg class="icon icon-rss"><use xlink:href="#icon-rss"></use></svg></a> -->
</div>
</div>
<a role="button" class="down" data-scroll href="#scroll"><svg class="icon icon-angle-down"><use xlink:href="#icon-angle-down"></use></svg></a>
{% include menu-search.html %}
</header>
<header class="header-post" role="banner">
<div class="content">
{% if page.date %}
<time itemprop="datePublished" datetime="{{ page.date }}" class="date">{{ page.date | date: "%Y/%m/%d" }}</time>
{% endif %}
<h1 class="post-title" itemprop="name">{{ page.title }}</h1>
<p itemprop="description" class="subtitle">{{ page.description }}</p>
</div>
<a class="down" data-scroll href="#scroll"><svg class="icon icon-angle-down"><use xlink:href="#icon-angle-down"></use></svg></a>
{% include menu-search.html %}
</header>
<div class="search-wrapper">
<div class="search-form">
<input type="text" class="search-field" placeholder="Search...">
<svg class="icon-remove-sign"><use xlink:href="#icon-close"></use></svg>
<ul class="search-results search-list"></ul>
</div>
</div>
<div id="fade" class="overlay"></div>
<a id="slide" class="slideButton fade">
<svg id="open" class="icon-menu"><use xlink:href="#icon-menu"></use></svg>
<svg id="close" class="icon-menu"><use xlink:href="#icon-close"></use></svg>
</a>
<aside id="sidebar">
<nav id="navigation">
<h2>MENU</h2>
<ul>
{% for link in site.links %}
<li><a href="{{ site.url }}{{ link.url }}">{{ link.title }}</a></li>
{% endfor %}
</ul>
</nav>
</aside>
<a id="search" class="dosearch">
<svg class="icon-menu icon-search"><use xlink:href="#icon-search"></use></svg>
</a>
<section class="share">
<h3>Share</h3>
<a aria-label="Share on Twitter" href="https://twitter.com/intent/tweet?text=&quot;{{ page.twitter_text }}&quot;%20{{ site.url }}{{ page.url }}%20via%20&#64;{{ site.twitter_username }}&hashtags={% for tag in page.tags %}{{tag}},{% endfor %}"
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;" title="Share on Twitter">
<svg class="icon icon-twitter"><use xlink:href="#icon-twitter"></use></svg>
</a>
<a aria-label="Share on Facebook"href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ page.url }}"
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;" title="Share on Facebook">
<svg class="icon icon-facebook"><use xlink:href="#icon-facebook"></use></svg>
</a>
<a aria-label="Share on Google Plus" href="https://plus.google.com/share?url={{ site.url }}{{ page.url }}"
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;" title="Share on Google+">
<svg class="icon icon-google-plus"><use xlink:href="#icon-google-plus"></use></svg>
</a>
</section>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" display="none" version="1.1"><defs><symbol id="icon-menu" viewBox="0 0 1024 1024"><path class="path1" d="M128 213.333h768q17.667 0 30.167 12.5t12.5 30.167-12.5 30.167-30.167 12.5h-768q-17.667 0-30.167-12.5t-12.5-30.167 12.5-30.167 30.167-12.5zM128 725.333h768q17.667 0 30.167 12.5t12.5 30.167-12.5 30.167-30.167 12.5h-768q-17.667 0-30.167-12.5t-12.5-30.167 12.5-30.167 30.167-12.5zM128 469.333h768q17.667 0 30.167 12.5t12.5 30.167-12.5 30.167-30.167 12.5h-768q-17.667 0-30.167-12.5t-12.5-30.167 12.5-30.167 30.167-12.5z"/></symbol><symbol id="icon-search" viewBox="0 0 951 1024"><path class="path1" d="M658.286 475.429q0-105.714-75.143-180.857t-180.857-75.143-180.857 75.143-75.143 180.857 75.143 180.857 180.857 75.143 180.857-75.143 75.143-180.857zM950.857 950.857q0 29.714-21.714 51.429t-51.429 21.714q-30.857 0-51.429-21.714l-196-195.429q-102.286 70.857-228 70.857-81.714 0-156.286-31.714t-128.571-85.714-85.714-128.571-31.714-156.286 31.714-156.286 85.714-128.571 128.571-85.714 156.286-31.714 156.286 31.714 128.571 85.714 85.714 128.571 31.714 156.286q0 125.714-70.857 228l196 196q21.143 21.143 21.143 51.429z"/></symbol><symbol id="icon-email" viewBox="0 0 1024 1024"><path class="path1" d="M950.857 859.429v-438.857q-18.286 20.571-39.429 37.714-153.143 117.714-243.429 193.143-29.143 24.571-47.429 38.286t-49.429 27.714-58.571 14h-1.143q-27.429 0-58.571-14t-49.429-27.714-47.429-38.286q-90.286-75.429-243.429-193.143-21.143-17.143-39.429-37.714v438.857q0 7.429 5.429 12.857t12.857 5.429h841.143q7.429 0 12.857-5.429t5.429-12.857zM950.857 258.857v-14t-0.286-7.429-1.714-7.143-3.143-5.143-5.143-4.286-8-1.429h-841.143q-7.429 0-12.857 5.429t-5.429 12.857q0 96 84 162.286 110.286 86.857 229.143 181.143 3.429 2.857 20 16.857t26.286 21.429 25.429 18 28.857 15.714 24.571 5.143h1.143q11.429 0 24.571-5.143t28.857-15.714 25.429-18 26.286-21.429 20-16.857q118.857-94.286 229.143-181.143 30.857-24.571 57.429-66t26.571-75.143zM1024 237.714v621.714q0 37.714-26.857 64.571t-64.571 26.857h-841.143q-37.714 0-64.571-26.857t-26.857-64.571v-621.714q0-37.714 26.857-64.571t64.571-26.857h841.143q37.714 0 64.571 26.857t26.857 64.571z"/></symbol><symbol id="icon-close" viewBox="0 0 805 1024"><path class="path1" d="M741.714 755.429q0 22.857-16 38.857l-77.714 77.714q-16 16-38.857 16t-38.857-16l-168-168-168 168q-16 16-38.857 16t-38.857-16l-77.714-77.714q-16-16-16-38.857t16-38.857l168-168-168-168q-16-16-16-38.857t16-38.857l77.714-77.714q16-16 38.857-16t38.857 16l168 168 168-168q16-16 38.857-16t38.857 16l77.714 77.714q16 16 16 38.857t-16 38.857l-168 168 168 168q16 16 16 38.857z"/></symbol><symbol id="icon-twitter" viewBox="0 0 951 1024"><path class="path1" d="M925.714 233.143q-38.286 56-92.571 95.429 0.571 8 0.571 24 0 74.286-21.714 148.286t-66 142-105.429 120.286-147.429 83.429-184.571 31.143q-154.857 0-283.429-82.857 20 2.286 44.571 2.286 128.571 0 229.143-78.857-60-1.143-107.429-36.857t-65.143-91.143q18.857 2.857 34.857 2.857 24.571 0 48.571-6.286-64-13.143-106-63.714t-42-117.429v-2.286q38.857 21.714 83.429 23.429-37.714-25.143-60-65.714t-22.286-88q0-50.286 25.143-93.143 69.143 85.143 168.286 136.286t212.286 56.857q-4.571-21.714-4.571-42.286 0-76.571 54-130.571t130.571-54q80 0 134.857 58.286 62.286-12 117.143-44.571-21.143 65.714-81.143 101.714 53.143-5.714 106.286-28.571z"/></symbol><symbol id="icon-facebook" viewBox="0 0 585 1024"><path class="path1" d="M548 6.857v150.857h-89.714q-49.143 0-66.286 20.571t-17.143 61.714v108h167.429l-22.286 169.143h-145.143v433.714h-174.857v-433.714h-145.714v-169.143h145.714v-124.571q0-106.286 59.429-164.857t158.286-58.571q84 0 130.286 6.857z"/></symbol><symbol id="icon-rss" viewBox="0 0 805 1024"><path class="path1" d="M219.429 768q0 45.714-32 77.714t-77.714 32-77.714-32-32-77.714 32-77.714 77.714-32 77.714 32 32 77.714zM512 838.286q1.143 16-9.714 27.429-10.286 12-26.857 12h-77.143q-14.286 0-24.571-9.429t-11.429-23.714q-12.571-130.857-105.429-223.714t-223.714-105.429q-14.286-1.143-23.714-11.429t-9.429-24.571v-77.143q0-16.571 12-26.857 9.714-9.714 24.571-9.714h2.857q91.429 7.429 174.857 46t148 103.714q65.143 64.571 103.714 148t46 174.857zM804.571 839.429q1.143 15.429-10.286 26.857-10.286 11.429-26.286 11.429h-81.714q-14.857 0-25.429-10t-11.143-24.286q-6.857-122.857-57.714-233.429t-132.286-192-192-132.286-233.429-58.286q-14.286-0.571-24.286-11.143t-10-24.857v-81.714q0-16 11.429-26.286 10.286-10.286 25.143-10.286h1.714q149.714 7.429 286.571 68.571t243.143 168q106.857 106.286 168 243.143t68.571 286.571z"/></symbol><symbol id="icon-google-plus" viewBox="0 0 951 1024"><path class="path1" d="M420 454.857q0 20.571 18.286 40.286t44.286 38.857 51.714 42 44 59.429 18.286 81.143q0 51.429-27.429 98.857-41.143 69.714-120.571 102.571t-170.286 32.857q-75.429 0-140.857-23.714t-98-78.571q-21.143-34.286-21.143-74.857 0-46.286 25.429-85.714t67.714-65.714q74.857-46.857 230.857-57.143-18.286-24-27.143-42.286t-8.857-41.714q0-20.571 12-48.571-26.286 2.286-38.857 2.286-84.571 0-142.571-55.143t-58-139.714q0-46.857 20.571-90.857t56.571-74.857q44-37.714 104.286-56t124.286-18.286h238.857l-78.857 50.286h-74.857q42.286 36 64 76t21.714 91.429q0 41.143-14 74t-33.714 53.143-39.714 37.143-34 35.143-14 37.714zM336.571 400q21.714 0 44.571-9.429t37.714-24.857q30.286-32.571 30.286-90.857 0-33.143-9.714-71.429t-27.714-74-48.286-59.143-66.857-23.429q-24 0-47.143 11.143t-37.429 30q-26.857 33.714-26.857 91.429 0 26.286 5.714 55.714t18 58.857 29.714 52.857 42.857 38.286 55.143 14.857zM337.714 898.857q33.143 0 63.714-7.429t56.571-22.286 41.714-41.714 15.714-62.286q0-14.286-4-28t-8.286-24-15.429-23.714-16.857-20-22-19.714-20.857-16.571-23.714-17.143-20.857-14.857q-9.143-1.143-27.429-1.143-30.286 0-60 4t-61.429 14.286-55.429 26.286-39.143 42.571-15.429 60.286q0 40 20 70.571t52.286 47.429 68 25.143 72.857 8.286zM800.571 398.286h121.714v61.714h-121.714v125.143h-60v-125.143h-121.143v-61.714h121.143v-124h60v124z"/></symbol><symbol id="icon-angle-down" viewBox="0 0 658 1024"><path class="path1" d="M614.286 420.571q0 7.429-5.714 13.143l-266.286 266.286q-5.714 5.714-13.143 5.714t-13.143-5.714l-266.286-266.286q-5.714-5.714-5.714-13.143t5.714-13.143l28.571-28.571q5.714-5.714 13.143-5.714t13.143 5.714l224.571 224.571 224.571-224.571q5.714-5.714 13.143-5.714t13.143 5.714l28.571 28.571q5.714 5.714 5.714 13.143z"/></symbol><symbol id="icon-github-alt" viewBox="0 0 951 1024"><path class="path1" d="M365.714 694.857q0 22.857-7.143 46.857t-24.571 43.429-41.429 19.429-41.429-19.429-24.571-43.429-7.143-46.857 7.143-46.857 24.571-43.429 41.429-19.429 41.429 19.429 24.571 43.429 7.143 46.857zM731.429 694.857q0 22.857-7.143 46.857t-24.571 43.429-41.429 19.429-41.429-19.429-24.571-43.429-7.143-46.857 7.143-46.857 24.571-43.429 41.429-19.429 41.429 19.429 24.571 43.429 7.143 46.857zM822.857 694.857q0-68.571-39.429-116.571t-106.857-48q-23.429 0-111.429 12-40.571 6.286-89.714 6.286t-89.714-6.286q-86.857-12-111.429-12-67.429 0-106.857 48t-39.429 116.571q0 50.286 18.286 87.714t46.286 58.857 69.714 34.286 80 16.857 85.143 4h96q46.857 0 85.143-4t80-16.857 69.714-34.286 46.286-58.857 18.286-87.714zM950.857 594.286q0 118.286-34.857 189.143-21.714 44-60.286 76t-80.571 49.143-97.143 27.143-98 12.571-95.429 2.571q-44.571 0-81.143-1.714t-84.286-7.143-87.143-17.143-78.286-29.429-69.143-46.286-49.143-65.714q-35.429-70.286-35.429-189.143 0-135.429 77.714-226.286-15.429-46.857-15.429-97.143 0-66.286 29.143-124.571 61.714 0 108.571 22.571t108 70.571q84-20 176.571-20 84.571 0 160 18.286 60-46.857 106.857-69.143t108-22.286q29.143 58.286 29.143 124.571 0 49.714-15.429 96 77.714 91.429 77.714 227.429z"/></symbol></defs></svg>
---
# Jekyll layout that compresses HTML
# v1.4.0
# http://jch.penibelst.de/
# © 2014–2015 Anatol Broder
# MIT License
---
{% if site.compress_html.ignore.envs contains jekyll.environment %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% case _pres.size %}{% when 2 %}{% capture _content %}{{ _content }}<pre{{ _pres.first }}</pre>{{ _pres.last | split: " " | join: " " }}{% endcapture %}{% when 1 %}{% capture _content %}{{ _content }}{{ _pres.last | split: " " | join: " " }}{% endcapture %}{% endcase %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% assign _comment_befores = _content | split: _comments.first %}{% for _comment_before in _comment_befores %}{% assign _comment_content = _comment_before | split: _comments.last | first %}{% if _comment_content %}{% capture _comment %}{{ _comments.first }}{{ _comment_content }}{{ _comments.last }}{% endcapture %}{% assign _content = _content | remove: _comment %}{% endif %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}
\ No newline at end of file
---
layout: compress
---
<!DOCTYPE html>
<html lang="pt-br">
{% include head.html %}
<body>
{% include svg-icons.html %}
{% include header-default.html %}
<section class="content">
{{ content }}
</section>
{% include footer.html %}
</body>
</html>
---
layout: compress
---
<!DOCTYPE html>
<html lang="pt-br">
{% include head.html %}
<body>
{% include svg-icons.html %}
{% include header-post.html %}
<section class="post" itemscope itemtype="http://schema.org/WebPage">
<article role="article" id="scroll" class="post-content" role="main" itemprop="mainContentOfPage">
{{ content }}
</article>
{% include footer.html %}
</section>
</body>
</html>
---
layout: default
---
<div class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
</header>
<article class="post-content">
{{ content }}
</article>
</div>
<!DOCTYPE html>
<html lang="pt-br">
{% include head.html %}
<body>
{% include svg-icons.html %}
{% include header-post.html %}
<section class="post" itemscope itemtype="http://schema.org/BlogPosting">
<article role="article" id="scroll" class="post-content" itemprop="articleBody">
{{ content }}
</article>
<!-- {% include share.html %} -->
{% include author.html %}
<!-- {% include comments.html %} -->
{% include footer.html %}
</section>
</body>
</html>
---
layout: post
title: "How to use"
date: 2015-08-03 03:32:44
image: '/assets/img/'
description: 'First steps to use this template'
tags:
- jekyll
- template
categories:
- I love Jekyll
twitter_text: 'How to install and use this template'
---
This is a simple and minimalist template for Jekyll designed for developers that want to write blog posts but don't want to care about frontend stuff.
The Theme features:
- Gulp
- Stylus (Jeet, Rupture, Kouto Swiss)
- Smoothscroll
- Live Search
- Offcanvas Menu
- SVG icons
- Shell Script to create posts
- Tags page
- Series page
- About Me page
- Feed RSS
- Sitemap.xml
- Color Customization
- Info Customization
## Basic Setup
1. [Install Jekyll](http://jekyllrb.com)
2. Fork the [Will Jekyll Template](https://github.com/willianjusten/will-jekyll-template/fork)
3. Clone the repo you just forked.
4. Edit `_config.yml` to personalize your site.
5. Check out the sample posts in `_posts` to see examples for assigning categories and tags, and other YAML data.
6. Read the documentation below for further customization pointers and documentation.
## Site and User Settings
You have to fill some informations on `_config.yml` to customize your site.
{% highlight ruby %}
# Site settings
description: A blog about lorem ipsum dolor sit amet
baseurl: "" # the subpath of your site, e.g. /blog/
url: "http://localhost:3000" # the base hostname & protocol for your site
# User settings
username: Lorem Ipsum
user_description: Anon Developer at Lorem Ipsum Dolor
user_title: Anon Developer
email: anon@anon.com
twitter_username: lorem_ipsum
github_username: lorem_ipsum
gplus_username: lorem_ipsum
disqus_username: lorem_ipsum
{% endhighlight %}
## Color customization
All color variables are in `src/styl/variable`. To change the main color, just set the new value at `main` assignment. Another colors are for texts and the code background color.
## Creating posts
You can use the `initpost.sh` to create your new posts. Just follow the command:
{% highlight bash %}
./initpost.sh -c Post Title
{% endhighlight %}
The new file will be created at `_posts` with this format `date-title.md`.
## Front-matter
When you create a new post, you need to fill the post information in the front-matter, follow this example:
{% highlight ruby %}
---
layout: post
title: "How to use"
date: 2015-08-03 03:32:44
image: '/assets/img/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'
---
{% endhighlight %}
## Running the blog in local
In order to compile the assets and run Jekyll on local you need to follow those steps:
- Install [NodeJS](https://nodejs.org/)
- Run `npm install`
- Run `gulp`
## Questions
Having a problem getting something to work or want to know why I setup something in a certain way? Ping me on Twitter [@willian_justen](https://twitter.com/willian_justen) or file a [GitHub Issue](https://github.com/willianjusten/will-jekyll-template/issues/new).
## License
This theme is free and open source software, distributed under the The MIT License. So feel free to use this Jekyll theme on your site without linking back to me or using a disclaimer.
If you’d like to give me credit somewhere on your blog or tweet a shout out to [@willian_justen](https://twitter.com/willian_justen), that would be pretty sweet.
---
layout: post
title: "Welcome to Jekyll"
date: 2015-08-04 03:21:35
image: '/assets/img/'
description: 'Put your description here.'
tags:
- jekyll
- web
categories:
- Jekyll is awesome
twitter_text: 'Put your twitter description here.'
---
You'll find this post in your `_posts` directory - edit this post and re-build (or run with the `-w` switch) to see your changes!
To add new posts, simply add a file in the `_posts` directory that follows the convention: YYYY-MM-DD-name-of-post.ext.
Jekyll also offers powerful support for code snippets:
{% highlight ruby %}
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}
Check out the [Jekyll docs][jekyll] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll's GitHub repo][jekyll-gh].
[jekyll-gh]: https://github.com/mojombo/jekyll
[jekyll]: http://jekyllrb.com
\ No newline at end of file
---
layout: minimal
title: "关于我们"
permalink: /about/index.html
description: "CODE CHINA 开源代码托管平台"
---
<h2>CSDN 工具赋能</h2>
<h4>开源项目托管平台——CODE CHINA</h4>
<p>CODE CHINA 是 CSDN 为开发者提供的开源项目托管平台,开发者和企业可以托管、运营、推广自己的开源项目,也可以托管自己的私有代码仓库。平台提供完善的源代码管理功能及开源协作功能,包括 Issue,WIKI,Pages,代码片,MR,Star,Fork 等社交编程功能以及 CI/CD 流水线、代码安全扫描等企业级的 DevOps 功能。</p>
<h2>教育为先</h2>
<p>CODE CHINA 打造能够在线编译、在线运行的课件即代码的基础环境,使得 CODE CHINA 能够结合云原生技术为开源技术的教学、学习提供一站式学习、练习的学习引擎,通过教学培训场景,赋能高校学生及开发者成为优秀开源项目的参与者和贡献者,助力更多优秀开源项目的产生、发展及壮大。</p>
<h2>开源知识分享社区</h2>
<p>通过开源小社区赋能开源项目更多能力,助力开源项目的社区运营,聚合新闻、博客、问答、直播等产品,在社区中产生更多丰富多彩的开源内容,打造更活跃的社区,让开源项目可以更高效地构建和运营开发者生态社区。CODE CHINA 还将在 GitHub 项目代码镜像的基础上,实现与 GitHub 的双向同步,包括Issue、Release、提交和 Merge Request/ Pull Request 等内容,形成国际开源项目的知识分享与交流,让开发者更加方便的围绕开源项目,展开知识分享,更方便的参与到国际开源项目中,见证中国的开源力量。</p>
<p>合作机构包括:</p>
<p><b>国内</b></p>
<ul class="skill-list">
<li>涛思数据 TDengine</li>
<li>DCloud uni-app </li>
<li>旷视 天元 MegEngine</li>
<li>RT-Thread</li>
<li>百度 飞桨 PaddlePaddle</li>
<li>JEECG开源社区 JeecgBoot</li>
<li>巨杉 SequoiaDB</li>
<li>阿里 dragonwell8</li>
</ul>
<p><b>高校</b></p>
<ul class="skill-list">
<li>清华大学</li>
<li>湖南大学</li>
<li>湖南师范大学</li>
</ul>
<p><b>国际</b></p>
<ul class="skill-list">
<li>OpenCV</li>
<li>Apache DolphinScheduler</li>
<li>Apache Pulsar</li>
</ul>
<p>自 2020 年 9 月上线以来, CODE CHINA 得到国内多家开源项目和组织的支持,累计项目 4.2 万,其中公开项目超 3.7 万,用户量超过 40 万;此外,从 GitHub 上 镜像了 2.5 万个优秀的开源项目,并且每天均会与 GitHub 进行同步更新。</p>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
---
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.title | xml_escape }}</title>
<description>{{ site.description | xml_escape }}</description>
<link>{{ site.url }}{{ site.baseurl }}/</link>
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<generator>Jekyll v{{ jekyll.version }}</generator>
{% for post in site.posts limit:10 %}
<item>
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | xml_escape | strip_html | truncatewords:100 }}</description>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
{% for tag in post.tags %}
<category>{{ tag | xml_escape }}</category>
{% endfor %}
{% for cat in post.categories %}
<category>{{ cat | xml_escape }}</category>
{% endfor %}
</item>
{% endfor %}
</channel>
</rss>
var gulp = require('gulp'),
plumber = require('gulp-plumber'),
browserSync = require('browser-sync'),
stylus = require('gulp-stylus'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
jeet = require('jeet'),
rupture = require('rupture'),
koutoSwiss = require('kouto-swiss'),
prefixer = require('autoprefixer-stylus'),
imagemin = require('gulp-imagemin'),
cp = require('child_process');
var messages = {
jekyllBuild: '<span style="color: grey">Running:</span> $ jekyll build'
};
var jekyllCommand = (/^win/.test(process.platform)) ? 'jekyll.bat' : 'jekyll';
/**
* Build the Jekyll Site
*/
gulp.task('jekyll-build', function (done) {
browserSync.notify(messages.jekyllBuild);
return cp.spawn(jekyllCommand, ['build'], {stdio: 'inherit'})
.on('close', done);
});
/**
* Rebuild Jekyll & do page reload
*/
gulp.task('jekyll-rebuild', ['jekyll-build'], function () {
browserSync.reload();
});
/**
* Wait for jekyll-build, then launch the Server
*/
gulp.task('browser-sync', ['jekyll-build'], function() {
browserSync({
server: {
baseDir: '_site'
}
});
});
/**
* Stylus task
*/
gulp.task('stylus', function(){
gulp.src('src/styl/main.styl')
.pipe(plumber())
.pipe(stylus({
use:[koutoSwiss(), prefixer(), jeet(),rupture()],
compress: true
}))
.pipe(gulp.dest('_site/assets/css/'))
.pipe(browserSync.reload({stream:true}))
.pipe(gulp.dest('assets/css'))
});
/**
* Javascript Task
*/
gulp.task('js', function(){
return gulp.src('src/js/**/*.js')
.pipe(plumber())
.pipe(concat('main.js'))
.pipe(uglify())
.pipe(gulp.dest('assets/js/'))
});
/**
* Imagemin Task
*/
gulp.task('imagemin', function() {
return gulp.src('src/img/**/*.{jpg,png,gif}')
.pipe(plumber())
.pipe(imagemin({ optimizationLevel: 3, progressive: true, interlaced: true }))
.pipe(gulp.dest('assets/img/'));
});
/**
* Watch stylus files for changes & recompile
* Watch html/md files, run jekyll & reload BrowserSync
*/
gulp.task('watch', function () {
gulp.watch('src/styl/**/*.styl', ['stylus']);
gulp.watch('src/js/**/*.js', ['js']);
gulp.watch('src/img/**/*.{jpg,png,gif}', ['imagemin']);
gulp.watch(['*.html', '_includes/*.html', '_layouts/*.html', '_posts/*'], ['jekyll-rebuild']);
});
/**
* Default task, running just `gulp` will compile the sass,
* compile the jekyll site, launch BrowserSync & watch files.
*/
gulp.task('default', ['js', 'stylus', 'browser-sync', 'watch']);
---
layout: default
---
<main id="scroll" class="home" role="main" itemprop="mainContentOfPage" itemscope="itemscope" itemtype="http://schema.org/Blog">
{% for post in site.posts %}
<article role="article" class="post-item" itemscope="itemscope" itemtype="http://schema.org/BlogPosting" itemprop="blogPost">
<a class="datetime" href="{{ post.url | prepend: site.baseurl }}">
<meta itemprop="datePublished" content="{{post.date}}">
<time datetime="{{ post.date | date_to_xmlschema }}">
<span class="day">
{{ post.date | date: "%d" }}
</span>
<span class="month-year">
{{ post.date | date: "%Y / %m" }}
</span>
</time>
</a>
<div class="content">
<a href="{{ post.url | prepend: site.baseurl }}"><h2 class="post-title" itemprop="name">{{ post.title }}</h2></a>
<p class="description">
{{ post.content | strip_html | truncatewords:40 }}
<a href="{{ post.url | prepend: site.baseurl }}" class="link"> 【阅读全文】</a>
</p>
<div class="tags">
{% for tag in post.tags %}
<a href="{{ site.baseurl }}/tags/#{{tag | slugify }}">{{ tag }}</a>
{% endfor %}
</div>
</div>
</article>
{% endfor %}
</main>
#!/usr/bin/env bash
# ------------------------------------------------------------------------------
#
# Program: initpost.sh
# Author: Vitor Britto
# Modified by: James Bowling
# Author: Vitor Britto (edited by Will)
# Description: script to create an initial structure for my posts.
#
# Usage: ./initpost.sh [options] <post name>
#
# Options:
# -h, --help output instructions
# -c, --create create post
# -d, --draft create draft post
#
# Alias: alias ipost="bash ~/path/to/script/initpost.sh"
#
# Example:
# ./initpost.sh -c How to replace strings with sed
#
# Important Notes:
# - This script was created to generate new markdown files for my blog.
#
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# | VARIABLES |
# ------------------------------------------------------------------------------
# CORE: Do not change these lines
# ----------------------------------------------------------------
POST_TITLE="${@:2:$(($#-1))}"
POST_NAME="$(echo ${@:2:$(($#-1))} | sed -e 's/ /-/g' | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/")"
CURRENT_DATE="$(date +'%Y-%m-%d')"
TIME=$(date +"%T")
# ----------------------------------------------------------------
# SETTINGS: your configuration goes here
# ----------------------------------------------------------------
# Set your destination folder
BINPATH=$(cd `dirname $0`; pwd)
POSTPATH="${BINPATH}/_posts"
DRAFTPATH="${BINPATH}/_drafts"
if [[ "${1}" == "-c" || "${1}" == "--create" ]]; then
DIST_FOLDER="$POSTPATH"
FILE_NAME="${CURRENT_DATE}-${POST_NAME}.md"
fi
if [[ "${1}" == "-d" || "${1}" == "--draft" ]]; then
DIST_FOLDER="$DRAFTPATH"
FILE_NAME="${POST_NAME}.md"
fi
if [[ "${1}" == "-p" || "${1}" == "--publish" ]]; then
DIST_FOLDER="$POSTPATH"
FILE_NAME="${CURRENT_DATE}-${POST_NAME}.md"
fi
# Set your blog URL
BLOG_URL="your_site"
# Set your assets URL
ASSETS_URL="assets/img/"
# ----------------------------------------------------------------
# ------------------------------------------------------------------------------
# | UTILS |
# ------------------------------------------------------------------------------
# Header logging
e_header() {
printf "$(tput setaf 38)→ %s$(tput sgr0)\n" "$@"
}
# Success logging
e_success() {
printf "$(tput setaf 76)✔ %s$(tput sgr0)\n" "$@"
}
# Error logging
e_error() {
printf "$(tput setaf 1)✖ %s$(tput sgr0)\n" "$@"
}
# Warning logging
e_warning() {
printf "$(tput setaf 3)! %s$(tput sgr0)\n" "$@"
}
# ------------------------------------------------------------------------------
# | MAIN FUNCTIONS |
# ------------------------------------------------------------------------------
# Everybody need some help
initpost_help() {
cat <<EOT
------------------------------------------------------------------------------
INIT POST - A shortcut to create an initial structure for my posts.
------------------------------------------------------------------------------
Usage: ./initpost.sh [options] <post name>
Options:
-h, --help output instructions
-c, --create create post
-d, --draft create draft post
-p, --publish publish/promote a draft to a post
Example:
./initpost.sh -c How to replace strings with sed
Important Notes:
- This script was created to generate new text files to my blog.
Copyright (c) Vitor Britto
Licensed under the MIT license.
------------------------------------------------------------------------------
EOT
}
# Initial Content
initpost_content() {
echo "---"
echo "layout: post"
echo "title: \"${POST_TITLE}\""
echo "date: ${CURRENT_DATE} ${TIME}"
echo "image: '/assets/img/'"
echo "description:"
echo "tags:"
echo "categories:"
echo "twitter_text:"
echo "---"
}
# Create post
initpost_file() {
if [ ! -f "$FILE_NAME" ]; then
e_header "Creating template..."
initpost_content > "${DIST_FOLDER}/${FILE_NAME}"
e_success "Initial post successfully created!"
else
e_warning "File already exist."
exit 1
fi
}
# Create draft
initdraft_file() {
if [ ! -f "$FILE_NAME" ]; then
e_header "Creating draft template..."
initpost_content > "${DIST_FOLDER}/${FILE_NAME}"
e_success "Initial draft successfully created!"
else
e_warning "File already exist."
exit 1
fi
}
# Promote draft
promote_draft() {
if [ ! -f "$FILE_NAME" ]; then
e_header "Promoting draft..."
if mv "${DRAFTPATH}/${POST_NAME}.md" "${POSTPATH}/${CURRENT_DATE}-${POST_NAME}.md"; then
sed -i -e "s/date: .*/date: ${CURRENT_DATE} ${TIME}/" ${POSTPATH}/${CURRENT_DATE}-${POST_NAME}.md
e_success "Draft promoted successfully!"
else
e_warning "File already exists or draft promotion failed."
exit 1
fi
fi
}
# ------------------------------------------------------------------------------
# | INITIALIZE PROGRAM |
# ------------------------------------------------------------------------------
main() {
# Show help
if [[ "${1}" == "-h" || "${1}" == "--help" ]]; then
initpost_help ${1}
exit
fi
# Create
if [[ "${1}" == "-c" || "${1}" == "--create" ]]; then
initpost_file $*
exit
fi
# Draft
if [[ "${1}" == "-d" || "${1}" == "--draft" ]]; then
initdraft_file $*
exit
fi
# Promote
if [[ "${1}" == "-p" || "${1}" == "--promote" ]]; then
promote_draft $*
exit
fi
}
# Initialize
main $*
\ No newline at end of file
{
"name": "willjekylltemplate",
"version": "1.0.0",
"description": "My jekyll blog template.",
"main": "gulpfile.js",
"scripts": {
"test": "test"
},
"keywords": [
"frontend",
"blog",
"css",
"stylus",
"gulp",
"jekyll",
"js"
],
"author": "Willian Justen de Vasconcellos",
"license": "MIT",
"devDependencies": {
"autoprefixer-stylus": "^0.4.0",
"browser-sync": "^1.9.0",
"grunt": "^0.4.5",
"gulp": "^3.8.10",
"gulp-concat": "^2.4.3",
"gulp-imagemin": "^2.1.0",
"gulp-plumber": "^0.6.6",
"gulp-stylus": "^1.3.7",
"gulp-uglify": "^1.0.2"
},
"dependencies": {
"jeet": "^6.1.4",
"kouto-swiss": "^0.11.14",
"rupture": "^0.6.1"
}
}
# robotstxt.org/
User-agent: *
\ No newline at end of file
---
---
[
{% for post in site.posts %}
{
"title" : "{{ post.title | escape }}",
"category" : "{{ post.categories }}",
"tags" : "{{ post.tags | array_to_sentence_string }}",
"url" : "{{ site.baseurl }}{{ post.url }}",
"date" : "{{ post.date | date_to_string}}"
} {% unless forloop.last %},{% endunless %}
{% endfor %}
]
\ No newline at end of file
---
layout: minimal
title: "专栏"
permalink: /series/index.html
image: '/assets/img/series.png'
description: "这里是我的专栏内容"
---
{% for tag in site.categories %}
<span class="tag-title" id="{{ tag[0] | slugify }}">{{ tag[0] | capitalize }}</span>
<ul class="post-list">
{% assign pages_list = tag[1] %}
{% for post in pages_list reversed %}
{% if post.title != null %}
{% if group == null or group == post.group %}
<li><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}<span class="entry-date"><time datetime="{{ post.date | date_to_xmlschema }}" itemprop="datePublished">{{ post.date | date: "%Y-%m-%d" }}</time></a></li>
{% endif %}
{% endif %}
{% endfor %}
{% assign pages_list = nil %}
{% assign group = nil %}
</ul>
{% endfor %}
---
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for post in site.posts %}
<url>
<loc>{{ post.url | prepend: site.baseurl | prepend: site.url }}</loc>
</url>
{% endfor %}
</urlset>
\ No newline at end of file
此差异已折叠。
/**
* smooth-scroll v5.3.3
* Animate scrolling to anchor links, by Chris Ferdinandi.
* http://github.com/cferdinandi/smooth-scroll
*
* Free to use under the MIT License.
* http://gomakethings.com/mit/
*/
(function (root, factory) {
if ( typeof define === 'function' && define.amd ) {
define('smoothScroll', factory(root));
} else if ( typeof exports === 'object' ) {
module.exports = factory(root);
} else {
root.smoothScroll = factory(root);
}
})(window || this, function (root) {
'use strict';
//
// Variables
//
var smoothScroll = {}; // Object for public APIs
var supports = !!document.querySelector && !!root.addEventListener; // Feature test
var settings, eventTimeout, fixedHeader;
// Default settings
var defaults = {
speed: 500,
easing: 'easeInOutCubic',
offset: 0,
updateURL: true,
callbackBefore: function () {},
callbackAfter: function () {}
};
//
// Methods
//
/**
* A simple forEach() implementation for Arrays, Objects and NodeLists
* @private
* @param {Array|Object|NodeList} collection Collection of items to iterate
* @param {Function} callback Callback function for each iteration
* @param {Array|Object|NodeList} scope Object/NodeList/Array that forEach is iterating over (aka `this`)
*/
var forEach = function (collection, callback, scope) {
if (Object.prototype.toString.call(collection) === '[object Object]') {
for (var prop in collection) {
if (Object.prototype.hasOwnProperty.call(collection, prop)) {
callback.call(scope, collection[prop], prop, collection);
}
}
} else {
for (var i = 0, len = collection.length; i < len; i++) {
callback.call(scope, collection[i], i, collection);
}
}
};
/**
* Merge defaults with user options
* @private
* @param {Object} defaults Default settings
* @param {Object} options User options
* @returns {Object} Merged values of defaults and options
*/
var extend = function ( defaults, options ) {
var extended = {};
forEach(defaults, function (value, prop) {
extended[prop] = defaults[prop];
});
forEach(options, function (value, prop) {
extended[prop] = options[prop];
});
return extended;
};
/**
* Get the closest matching element up the DOM tree
* @param {Element} elem Starting element
* @param {String} selector Selector to match against (class, ID, or data attribute)
* @return {Boolean|Element} Returns false if not match found
*/
var getClosest = function (elem, selector) {
var firstChar = selector.charAt(0);
for ( ; elem && elem !== document; elem = elem.parentNode ) {
if ( firstChar === '.' ) {
if ( elem.classList.contains( selector.substr(1) ) ) {
return elem;
}
} else if ( firstChar === '#' ) {
if ( elem.id === selector.substr(1) ) {
return elem;
}
} else if ( firstChar === '[' ) {
if ( elem.hasAttribute( selector.substr(1, selector.length - 2) ) ) {
return elem;
}
}
}
return false;
};
/**
* Get the height of an element
* @private
* @param {Node]} elem The element
* @return {Number} The element's height
*/
var getHeight = function (elem) {
return Math.max( elem.scrollHeight, elem.offsetHeight, elem.clientHeight );
};
/**
* Escape special characters for use with querySelector
* @private
* @param {String} id The anchor ID to escape
* @author Mathias Bynens
* @link https://github.com/mathiasbynens/CSS.escape
*/
var escapeCharacters = function ( id ) {
var string = String(id);
var length = string.length;
var index = -1;
var codeUnit;
var result = '';
var firstCodeUnit = string.charCodeAt(0);
while (++index < length) {
codeUnit = string.charCodeAt(index);
// Note: there’s no need to special-case astral symbols, surrogate
// pairs, or lone surrogates.
// If the character is NULL (U+0000), then throw an
// `InvalidCharacterError` exception and terminate these steps.
if (codeUnit === 0x0000) {
throw new InvalidCharacterError(
'Invalid character: the input contains U+0000.'
);
}
if (
// If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
// U+007F, […]
(codeUnit >= 0x0001 && codeUnit <= 0x001F) || codeUnit == 0x007F ||
// If the character is the first character and is in the range [0-9]
// (U+0030 to U+0039), […]
(index === 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
// If the character is the second character and is in the range [0-9]
// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
(
index === 1 &&
codeUnit >= 0x0030 && codeUnit <= 0x0039 &&
firstCodeUnit === 0x002D
)
) {
// http://dev.w3.org/csswg/cssom/#escape-a-character-as-code-point
result += '\\' + codeUnit.toString(16) + ' ';
continue;
}
// If the character is not handled by one of the above rules and is
// greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or
// is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to
// U+005A), or [a-z] (U+0061 to U+007A), […]
if (
codeUnit >= 0x0080 ||
codeUnit === 0x002D ||
codeUnit === 0x005F ||
codeUnit >= 0x0030 && codeUnit <= 0x0039 ||
codeUnit >= 0x0041 && codeUnit <= 0x005A ||
codeUnit >= 0x0061 && codeUnit <= 0x007A
) {
// the character itself
result += string.charAt(index);
continue;
}
// Otherwise, the escaped character.
// http://dev.w3.org/csswg/cssom/#escape-a-character
result += '\\' + string.charAt(index);
}
return result;
};
/**
* Calculate the easing pattern
* @private
* @link https://gist.github.com/gre/1650294
* @param {String} type Easing pattern
* @param {Number} time Time animation should take to complete
* @returns {Number}
*/
var easingPattern = function ( type, time ) {
var pattern;
if ( type === 'easeInQuad' ) pattern = time * time; // accelerating from zero velocity
if ( type === 'easeOutQuad' ) pattern = time * (2 - time); // decelerating to zero velocity
if ( type === 'easeInOutQuad' ) pattern = time < 0.5 ? 2 * time * time : -1 + (4 - 2 * time) * time; // acceleration until halfway, then deceleration
if ( type === 'easeInCubic' ) pattern = time * time * time; // accelerating from zero velocity
if ( type === 'easeOutCubic' ) pattern = (--time) * time * time + 1; // decelerating to zero velocity
if ( type === 'easeInOutCubic' ) pattern = time < 0.5 ? 4 * time * time * time : (time - 1) * (2 * time - 2) * (2 * time - 2) + 1; // acceleration until halfway, then deceleration
if ( type === 'easeInQuart' ) pattern = time * time * time * time; // accelerating from zero velocity
if ( type === 'easeOutQuart' ) pattern = 1 - (--time) * time * time * time; // decelerating to zero velocity
if ( type === 'easeInOutQuart' ) pattern = time < 0.5 ? 8 * time * time * time * time : 1 - 8 * (--time) * time * time * time; // acceleration until halfway, then deceleration
if ( type === 'easeInQuint' ) pattern = time * time * time * time * time; // accelerating from zero velocity
if ( type === 'easeOutQuint' ) pattern = 1 + (--time) * time * time * time * time; // decelerating to zero velocity
if ( type === 'easeInOutQuint' ) pattern = time < 0.5 ? 16 * time * time * time * time * time : 1 + 16 * (--time) * time * time * time * time; // acceleration until halfway, then deceleration
return pattern || time; // no easing, no acceleration
};
/**
* Calculate how far to scroll
* @private
* @param {Element} anchor The anchor element to scroll to
* @param {Number} headerHeight Height of a fixed header, if any
* @param {Number} offset Number of pixels by which to offset scroll
* @returns {Number}
*/
var getEndLocation = function ( anchor, headerHeight, offset ) {
var location = 0;
if (anchor.offsetParent) {
do {
location += anchor.offsetTop;
anchor = anchor.offsetParent;
} while (anchor);
}
location = location - headerHeight - offset;
return location >= 0 ? location : 0;
};
/**
* Determine the document's height
* @private
* @returns {Number}
*/
var getDocumentHeight = function () {
return Math.max(
document.body.scrollHeight, document.documentElement.scrollHeight,
document.body.offsetHeight, document.documentElement.offsetHeight,
document.body.clientHeight, document.documentElement.clientHeight
);
};
/**
* Convert data-options attribute into an object of key/value pairs
* @private
* @param {String} options Link-specific options as a data attribute string
* @returns {Object}
*/
var getDataOptions = function ( options ) {
return !options || !(typeof JSON === 'object' && typeof JSON.parse === 'function') ? {} : JSON.parse( options );
};
/**
* Update the URL
* @private
* @param {Element} anchor The element to scroll to
* @param {Boolean} url Whether or not to update the URL history
*/
var updateUrl = function ( anchor, url ) {
if ( history.pushState && (url || url === 'true') ) {
history.pushState( null, null, [root.location.protocol, '//', root.location.host, root.location.pathname, root.location.search, anchor].join('') );
}
};
/**
* Start/stop the scrolling animation
* @public
* @param {Element} toggle The element that toggled the scroll event
* @param {Element} anchor The element to scroll to
* @param {Object} options
*/
smoothScroll.animateScroll = function ( toggle, anchor, options ) {
// Options and overrides
var settings = extend( settings || defaults, options || {} ); // Merge user options with defaults
var overrides = getDataOptions( toggle ? toggle.getAttribute('data-options') : null );
settings = extend( settings, overrides );
anchor = '#' + escapeCharacters(anchor.substr(1)); // Escape special characters and leading numbers
// Selectors and variables
var anchorElem = anchor === '#' ? document.documentElement : document.querySelector(anchor);
var startLocation = root.pageYOffset; // Current location on the page
if ( !fixedHeader ) { fixedHeader = document.querySelector('[data-scroll-header]'); } // Get the fixed header if not already set
var headerHeight = fixedHeader === null ? 0 : ( getHeight( fixedHeader ) + fixedHeader.offsetTop ); // Get the height of a fixed header if one exists
var endLocation = getEndLocation( anchorElem, headerHeight, parseInt(settings.offset, 10) ); // Scroll to location
var animationInterval; // interval timer
var distance = endLocation - startLocation; // distance to travel
var documentHeight = getDocumentHeight();
var timeLapsed = 0;
var percentage, position;
// Update URL
updateUrl(anchor, settings.updateURL);
/**
* Stop the scroll animation when it reaches its target (or the bottom/top of page)
* @private
* @param {Number} position Current position on the page
* @param {Number} endLocation Scroll to location
* @param {Number} animationInterval How much to scroll on this loop
*/
var stopAnimateScroll = function (position, endLocation, animationInterval) {
var currentLocation = root.pageYOffset;
if ( position == endLocation || currentLocation == endLocation || ( (root.innerHeight + currentLocation) >= documentHeight ) ) {
clearInterval(animationInterval);
anchorElem.focus();
settings.callbackAfter( toggle, anchor ); // Run callbacks after animation complete
}
};
/**
* Loop scrolling animation
* @private
*/
var loopAnimateScroll = function () {
timeLapsed += 16;
percentage = ( timeLapsed / parseInt(settings.speed, 10) );
percentage = ( percentage > 1 ) ? 1 : percentage;
position = startLocation + ( distance * easingPattern(settings.easing, percentage) );
root.scrollTo( 0, Math.floor(position) );
stopAnimateScroll(position, endLocation, animationInterval);
};
/**
* Set interval timer
* @private
*/
var startAnimateScroll = function () {
settings.callbackBefore( toggle, anchor ); // Run callbacks before animating scroll
animationInterval = setInterval(loopAnimateScroll, 16);
};
/**
* Reset position to fix weird iOS bug
* @link https://github.com/cferdinandi/smooth-scroll/issues/45
*/
if ( root.pageYOffset === 0 ) {
root.scrollTo( 0, 0 );
}
// Start scrolling animation
startAnimateScroll();
};
/**
* If smooth scroll element clicked, animate scroll
* @private
*/
var eventHandler = function (event) {
var toggle = getClosest(event.target, '[data-scroll]');
if ( toggle && toggle.tagName.toLowerCase() === 'a' ) {
event.preventDefault(); // Prevent default click event
smoothScroll.animateScroll( toggle, toggle.hash, settings); // Animate scroll
}
};
/**
* On window scroll and resize, only run events at a rate of 15fps for better performance
* @private
* @param {Function} eventTimeout Timeout function
* @param {Object} settings
*/
var eventThrottler = function (event) {
if ( !eventTimeout ) {
eventTimeout = setTimeout(function() {
eventTimeout = null; // Reset timeout
headerHeight = fixedHeader === null ? 0 : ( getHeight( fixedHeader ) + fixedHeader.offsetTop ); // Get the height of a fixed header if one exists
}, 66);
}
};
/**
* Destroy the current initialization.
* @public
*/
smoothScroll.destroy = function () {
// If plugin isn't already initialized, stop
if ( !settings ) return;
// Remove event listeners
document.removeEventListener( 'click', eventHandler, false );
root.removeEventListener( 'resize', eventThrottler, false );
// Reset varaibles
settings = null;
eventTimeout = null;
fixedHeader = null;
};
/**
* Initialize Smooth Scroll
* @public
* @param {Object} options User settings
*/
smoothScroll.init = function ( options ) {
// feature test
if ( !supports ) return;
// Destroy any existing initializations
smoothScroll.destroy();
// Selectors and variables
settings = extend( defaults, options || {} ); // Merge user options with defaults
fixedHeader = document.querySelector('[data-scroll-header]'); // Get the fixed header
// When a toggle is clicked, run the click handler
document.addEventListener('click', eventHandler, false );
if ( fixedHeader ) { root.addEventListener( 'resize', eventThrottler, false ); }
};
//
// Public APIs
//
return smoothScroll;
});
\ No newline at end of file
(function($) {
$.fn.simpleJekyllSearch = function(options) {
var settings = $.extend({
jsonFile : 'https://willianjusten.github.io/will-jekyll-template/search.json',
jsonFormat : 'title,category,desc,url,date,shortdate',
template : '<li><article><a href="{url}">{title} <span class="entry-date"><time datetime="{date}">{date}</time></span></a></article></li>',
searchResults : '.search-results',
searchResultsTitle : '<h4>Search Results:</h4>',
limit : '5',
noResults : '<p>Oh snap!<br/><small>Nothing found! :(</small></p>'
}, options);
var properties = settings.jsonFormat.split(',');
var jsonData = [],
origThis = this,
searchResults = $(settings.searchResults);
if(settings.jsonFile.length && searchResults.length){
$.ajax({
type: "GET",
url: settings.jsonFile,
dataType: 'json',
success: function(data, textStatus, jqXHR) {
jsonData = data;
registerEvent();
},
error: function(x,y,z) {
console.log("***ERROR in simpleJekyllSearch.js***");
console.log(x);
console.log(y);
console.log(z);
// x.responseText should have what's wrong
}
});
}
function registerEvent(){
origThis.keyup(function(e){
if($(this).val().length){
writeMatches( performSearch($(this).val()) );
}else{
clearSearchResults();
}
});
}
function performSearch(str){
var matches = [];
$.each(jsonData,function(i,entry){
for(var i=0;i<properties.length;i++)
if(entry[properties[i]] !== undefined && entry[properties[i]].toLowerCase().indexOf(str.toLowerCase()) !== -1){
matches.push(entry);
i=properties.length;
}
});
return matches;
}
function writeMatches(m){
clearSearchResults();
searchResults.append( $(settings.searchResultsTitle) );
if(m.length){
$.each(m,function(i,entry){
if(i<settings.limit){
var output=settings.template;
for(var i=0;i<properties.length;i++){
var regex = new RegExp("\{" + properties[i] + "\}", 'g');
output = output.replace(regex, entry[properties[i]]);
}
searchResults.append($(output));
}
});
}else{
searchResults.append( settings.noResults );
}
}
function clearSearchResults(){
searchResults.children().remove();
}
}
}(Zepto));
(function( $, window, undefined ) {
// Menu
$("a#slide").click(function(){
$("#sidebar,a#slide,#fade").addClass("slide");
$("#open").hide();
$("#search").hide();
$("#close").show();
});
$("#fade").click(function(){
$("#sidebar,a#slide,#fade").removeClass("slide");
$("#open").show();
$("#search").show();
$("#close").hide();
});
// Search
var bs = {
close: $(".icon-remove-sign"),
searchform: $(".search-form"),
canvas: $("body"),
dothis: $('.dosearch')
};
bs.dothis.on('click', function() {
$('.search-wrapper').toggleClass('active');
bs.searchform.toggleClass('active');
bs.searchform.find('input').focus();
bs.canvas.toggleClass('search-overlay');
$('.search-field').simpleJekyllSearch();
});
bs.close.on('click', function() {
$('.search-wrapper').toggleClass('active');
bs.searchform.toggleClass('active');
bs.canvas.removeClass('search-overlay');
});
// Scroll
smoothScroll.init({
updateURL: false
})
})( Zepto, window );
\ No newline at end of file
@keyframes pulse
from
opacity .4
top 0
50%
opacity 1
top -10px
to
opacity .4
top 0
\ No newline at end of file
.author
background lightGray
display table
width 100%
padding rem(40px) 0
margin rem(40px) 0
+above(cut)
padding rem(50px) 0
.details
margin auto
max-width rem(800px)
padding 0 rem(20px)
+below(cut)
text-align center
img
border-radius 50%
display block
margin auto
+above(cut)
float left
margin-right 3.125rem
.def
color gray
font-size 1.125rem
mainFont(300)
margin rem(10px)
+above(cut)
margin 0
padding-top rem(25px)
.name
margin 0
a
mainFont()
text-decoration none
color black
font-size rem(30px)
&:hover
color main
+above(cut)
font-size rem(45px)
.desc
mainFont(300)
margin rem(10px)
font-size rem(16px)
+above(cut)
font-size rem(20px)
.email
text-decoration none
color main
.tags
margin-top rem(30px)
a
font-size rem(14px)
color main
display inline-block
border 1px solid main
border-radius rem(5px)
padding rem(4px) rem(10px)
margin-right rem(2px)
margin-bottom rem(8px)
text-decoration none
&:hover
color hover
border 1px solid hover
.img-rounded
border-radius 50%
\ No newline at end of file
.comments
center(rem(800px))
padding 0 rem(20px)
h3
margin 0 0 rem(30px)
font-size rem(30px)
footer
background main
padding rem(25px) 0
margin-top 100px
p,a
text-decoration none
mainFont(300)
color sec
text-align center
margin 0
a:hover
color #990000
\ No newline at end of file
html,
body
height 100%
$bg
background main
height 100%
.content
width 95%
align(both)
text-align center
// Header home
.header-site
@extends $bg
h1,h2
color: sec
text-align center
.site-title
font-size rem(60px)
line-height 1
margin-top -80px
display block
+above(cut)
margin-bottom 0
font-size rem(100px)
.site-description
font-size rem(20px)
display block
margin rem(30px) 0
+above(cut)
font-size rem(40px)
// Header Post
.header-post
@extends $bg
.content
+above(cut)
center(1000px)
.subheader
display table
padding 20px
a
border 2px solid sec
border-radius 20px
padding 0 10px
+above(cut)
padding 0 10px
.date
mainFont(300)
font-size rem(16px)
h1
text-transform uppercase
font-size rem(30px)
margin 0 0 30px
+above(cut)
font-size rem(60px)
.subtitle
mainFont(300)
font-size rem(20px)
h1,.subtitle, .date
color sec
text-align center
p
color sec
text-decoration none
mainFont(300)
font-size rem(18px)
\ No newline at end of file
pre
background #222
width 100%
padding rem(20px) 0
color sec
margin rem(30px) 0
font-size rem(14px)
+above(cut)
font-size rem(16px)
padding rem(40px) 0
margin rem(50px) 0
code
center(rem(800))
padding 0 rem(20px)
+below(cut)
overflow-x: scroll;
span
line-height 1.5rem
font-family 'Monaco','Consolas','Menlo',monospace
.highlight
margin 0
+above(cut)
word-wrap break-word
.hll
background-color #333
.c, // Comment
.cm, // Comment.Multiline
.cp, // Comment.Preproc
.c1, // Comment.Single
.cs // Comment.Special
color #75715e
// Error
.err
color #960050
background-color #1e0010
.k, // Keyword
.kc, // Keyword.Constant
.kd, // Keyword.Declaration
.kp, // Keyword.Pseudo
.kr, // Keyword.Reserved
.kt, // Keyword.Type
.no // Name.Constant
color #66d9ef
.l, // Literal
.mf, // Literal.Number.Float
.mh, // Literal.Number.Hex
.mi, // Literal.Number.Integer
.mo, // Literal.Number.Oct
.se, // Literal.String.Escape
.il // Literal.Number.Integer.Long
color #ae81ff
.o, // Operator
.p // Punctuation
color #f7f7f2
.m, // Literal.Number
.n, // Name
.nb, // Name.Builtin
.ni, // Name.Entity
.nl, // Name.Label
.nn, // Name.Namespace
.py, // Name.Property
.nv, // Name.Variable
.w, // Text.Whitespace
.bp, // Name.Builtin.Pseudo
.vc, // Name.Variable.Class
.vg, // Name.Variable.Global
.vi // Name.Variable.Instance
color #a4d043
.kn, // Keyword.Namespace
.nt, // Name.Tag
.ow // Operator.Word
color #f92672
.ge // Generic.Emph
font-style italic
.gs // Generic.Strong
font-weight bold
.ld, // Literal.Date
.s, // Literal.String
.sb, // Literal.String.Backtick
.sc, // Literal.String.Char
.sd, // Literal.String.Doc
.s2, // Literal.String.Double
.sh, // Literal.String.Heredoc
.si, // Literal.String.Interpol
.sx, // Literal.String.Other
.sr, // Literal.String.Regex
.s1, // Literal.String.Single
.ss // Literal.String.Symbol
color #e6db74
.na, // Name.Attribute
.nc, // Name.Class
.nd, // Name.Decorator
.ne, // Name.Exception
.nf, // Name.Function
.nx // Name.Other
color #a6e22e
\ No newline at end of file
.post-item
text-align left
padding rem(40px) 0
border-bottom 3px solid lightGray
center(rem(1000px))
+below(rem(1000px))
padding-left rem(20px)
padding-right rem(20px)
.datetime
col(1/6)
text-align center
text-decoration none
+below(cut)
stack()
.day
mainFont(800)
color main
font-size rem(80px)
line-height 1.6
+below(cut)
stack()
.month-year
color black
font-size rem(18px)
.content
col(5/6)
+below(cut)
stack()
a
text-decoration none
.date
color main
.post-title
color black
font-size rem(32px)
+below(cut)
text-align center
.description
color texts
mainFont(300)
font-size rem(20px)
a
color main
text-decoration underline
\ No newline at end of file
size(width = 30, height = 30)
width width px
height height px
.icons-home
text-align center
a
display inline-block
padding rem(15px)
margin rem(2px)
border-radius 50%
border rem(2px) solid sec
line-height 0
transition all .7s
.icon
fill sec
size(18,18)
+above(cut)
size()
&:hover
background sec
.icon
fill main
.down
position absolute
bottom 50px
width 100%
display block
text-align center
.icon
align(both)
size(100,100)
fill sec
animation pulse 1.3s infinite
\ No newline at end of file
*, *:before, *:after
-moz-box-sizing border-box
-webkit-box-sizing border-box
box-sizing border-box
body
left 0
right 0
margin auto
a, aside, .overlay, body
transition all .25s ease
a.slideButton, .dosearch
position absolute
display block
width 40px
height 40px
top 10px
z-index 31
.slideButton
left 10px
.dosearch
right 10px
background darken(main,10%)
border-radius rem(3px)
padding rem(2px) rem(3px)
.icon-menu
cursor pointer
padding rem(5px)
border-radius rem(3px)
background darken(main,10%)
width rem(40px)
height rem(40px)
fill sec
.icon-search
width rem(35px)
height rem(35px)
.overlay
cursor pointer
#close
display none
aside
position fixed
height 100%
width rem(240px)
padding rem(40px) 0 0
top 0
left rem(-240px)
background #3F3F3F
z-index 20
box-shadow inset -10px -1px 15px -9px rgba(0,0,0,0.5)
h2
text-align center
margin 0 0 rem(10px)
mainFont(800)
font-size rem(20px)
color sec
nav
ul
padding 0
li
margin 0
list-style-type none
a
width 100%
display block
padding rem(20px)
text-decoration none
mainFont(300)
color #b3b3b1
border-top 1px solid darken(lightGray,50%)
&:hover
color #191918
background sec
.feed
border-bottom 1px solid darken(lightGray,50%)
&.slide
left 0
a.slideButton.slide
left rem(250px)
pointer-events none
.overlay
position fixed
width 100%
height 100%
top 0
left 0
pointer-events none
background transparent
z-index 30
&.slide
pointer-events auto
left 240px
background rgba(0,0,0,.6)
\ No newline at end of file
.post-content
padding rem(40px) 0
img
max-width 100%
margin rem(30px) auto
display block
p, h1, h2, h3, h4,ul,ol, .tags, iframe
center(rem(800px))
padding 0 rem(20px)
margin 0 auto rem(30px)
mainFont(300)
font-size rem(18px)
line-height 2
letter-spacing 0.01rem
+above(cut)
font-size rem(20px)
p,li
color texts
code
color colorcode
a
mainFont(300)
color main
text-decoration none
border-bottom 2px solid main
iframe
margin-top rem(30px)
width 100%
#twitter-widget-0
margin auto !important
h1,h2,h3,h4,h5
mainFont(800)
h1
font-size rem(30px)
line-height 1.4
+above(cut)
font-size rem(45px)
h2
font-size rem(22px)
line-height 1.4
+above(cut)
font-size rem(35px)
h3
font-size rem(18px)
line-height 1.4
+above(cut)
font-size rem(25px)
ul,ol
padding-left rem(40px)
ul.post-list
padding 0
+below(cut)
padding 0 rem(20px)
blockquote
center(rem(730px))
border-left rem(5px) solid main
padding 0 rem(30px)
margin rem(50px) auto
+below(cut)
width 70%
p
color rgba(0,0,0,0.6)
margin 0
+below(cut)
font-size rem(18px)
line-height 1.5
padding 0
hr
center(rem(760px))
border 1px solid lightGray
margin 50px auto
.share
center(800px)
text-align center
border-top 1px solid lightGray
padding-top rem(20px)
svg
margin rem(15px)
size(35,35)
a
text-decoration none
&:hover svg
fill main
table
margin rem(50px) auto
+below(cut)
display none
th, td
border rem(2px) solid #ccc
padding rem(5px)
.tag-title
mainFont(300)
font-size rem(36px)
margin-top rem(60px)
center(rem(800px))
+below(cut)
font-size rem(28px)
margin-top rem(20px)
padding 0 rem(20px)
.post-list
list-style none
margin rem(25px) auto
+below(cut)
padding 0 rem(20px)
a
display block
border-bottom 1px solid darken(lightGray,10%)
padding rem(10px) 0
text-decoration none
transition all .5s
&:hover
color hover
border-bottom 1px solid hover
.entry-date
float right
+below(cut)
display none
/*--search--*/
input[type="search"]
-webkit-box-sizing content-box
-moz-box-sizing content-box
-ms-box-sizing content-box
box-sizing content-box
-webkit-appearance textfield
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button
-webkit-appearance none
.search-wrapper
transform translateY(-400px)
z-index 9999
&.active
transform translateY(0)
.search-form
position relative
top 0
transform translateX(-200px)
z-index 9999
width 100%
opacity 0
transition all 200ms 100ms cubic-bezier(0,0.6,0.4,1)
h4
margin rem(10px) 0
.search-field
width 100%
mainFont(300)
font-size rem(26px)
color #fff
background-color transparent
border 0
border-bottom 1px solid #fff
border-radius 0
box-shadow none
background-clip padding-box
-webkit-appearance none
&:focus
outline 0
box-shadow none
&.active
top 0
transform translateX(0)
opacity 1
&.hidden
display none
.icon-remove-sign
position absolute
top 0
right 0
z-index 1
display block
fill sec
width 30px
height 30px
text-align center
cursor pointer
&::-webkit-input-placeholder
font-size rem(26px)
.search-form .search-field::-webkit-search-decoration,
.search-form .search-field::-webkit-search-cancel-button,
.search-form .search-field::-webkit-search-results-button,
.search-form .search-field::-webkit-search-results-decoration
display none
.search-form
.search-list
position absolute
width 100%
mainFont(300)
h4, li, p, a, a:hover
color sec
body
&.search-overlay
overflow hidden
&:after
position absolute
top 0
left 0
z-index 9001
width 100%
height 100%
min-height 100%
background-color rgba(0,0,0,0.6)
content ''
+below(cut)
background-color main
.search-wrapper
position absolute
top 50px
width 100%
padding-right 10%
padding-left 10%
*zoom 1
&:after, &:before
display table
line-height 0
content ""
&:after
clear both
.search-wrapper:before,
.search-wrapper:after
display table
line-height 0
content ""
.search-list
padding 0
margin 0
list-style-type none
.entry-date
float right
display none
font-size 14px
text-transform uppercase
a
text-decoration none
display block
padding rem(15px) 0
width 100%
border-bottom 1px solid sec
&:hover
color darken(sec, 30%)
border-bottom 1px solid darken(sec, 30%)
+above(48em)
.search-wrapper
top 100px
.search-list .entry-date
display inline
a
-webkit-tap-highlight-color: rgba(0,0,0,0);
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(https://fonts.gstatic.com/s/opensans/v10/DXI1ORHCpsQm3Vp6mXoaTRampu5_7CjHW5spxoeN3Vs.woff2) format('woff2');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 800;
src: local('Open Sans Extrabold'), local('OpenSans-Extrabold'), url(https://fonts.gstatic.com/s/opensans/v10/EInbV5DfGHOiMmvb1Xr-hiYtBUPDK3WL7KRKS_3q7OE.woff2) format('woff2');
}
mainFont(weight = 800)
font-family 'Open Sans', sans-serif
font-weight weight
font-style normal
h1,h2,h3,h4
mainFont()
\ No newline at end of file
// COLORS
main = #0562DC
hover = darken(main, 50%)
sec = #FFFFFF
lightGray = #F2F2F2
texts = #333333
colorcode = #3085F4
// Resolution
cut = 37.5rem
\ No newline at end of file
/* Syntax Quick Reference for Jeet
--------------------------
column(ratios = 1, offset = 0, cycle = 0, uncycle = 0, gutter = jeet.gutter)
span(ratio = 1, offset = 0)
shift(ratios = 0, col_or_span = column, gutter = jeet.gutter)
unshift()
edit()
center(max_width = 1410px, pad = 0)
stack(pad = 0, align = false)
unstack()
align(direction = both)
cf()
For more info see:
Kouto Swiss Doc: http://kouto-swiss.io/
Jeet Doc: http://jeet.gs
And of course, look in node_modules for axis-css and jeet
*/
@import "kouto-swiss"
@import "jeet"
normalize()
@import "_variables"
@import "_typo"
@import "_animations"
@import "_icons"
@import "_menu"
@import "_search"
@import "_elements"
@import "_header"
@import "_home"
@import "_post"
@import "_hightlight"
@import "_author"
@import "_footer"
\ No newline at end of file
---
layout: minimal
title: "#分类"
permalink: /tags/index.html
description: "文章关键词分类"
---
<div class="tags">
{% assign tags_list = site.tags %}
{% if tags_list.first[0] == null %}
{% for tag in tags_list %}
<a data-scroll href="#{{ tag | slugify }}">{{ tag }}</a>
{% endfor %}
{% else %}
{% for tag in tags_list %}
<a data-scroll href="#{{ tag[0] | slugify }}">{{ tag[0] }}</a>
{% endfor %}
{% endif %}
{% assign tags_list = nil %}
</div>
{% for tag in site.tags %}
<span class="tag-title" id="{{ tag[0] | slugify }}">{{ tag[0] }}</span>
<ul class="post-list">
{% assign pages_list = tag[1] %}
{% for post in pages_list reversed %}
{% if post.title != null %}
{% if group == null or group == post.group %}
<li><a href="{{ site.url }}{{ post.url }}">{{ post.title }}<span class="entry-date"><time datetime="{{ post.date | date_to_xmlschema }}" itemprop="datePublished">{{ post.date | date: "%Y-%m-%d" }}</time></a></li>
{% endif %}
{% endif %}
{% endfor %}
{% assign pages_list = nil %}
{% assign group = nil %}
</ul>
{% endfor %}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册