Skip to content

Commit a76f317

Browse files
committed
初始化
1 parent b81c737 commit a76f317

File tree

159 files changed

+33115
-40
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+33115
-40
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_site/

404.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
您访问的资源不存在
1+
---
2+
layout: page
3+
title: Page not found
4+
---
5+
6+
Try got get back to the Home Page and start over!
7+
8+
[Go to the Home Page]({{ site.url }}{{ site.baseurl }})

Gemfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
gem "github-pages", group: :jekyll_plugins
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
gemspec

Gemfile.lock

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
PATH
2+
remote: .
3+
specs:
4+
jekyll-sleek (0.1.3)
5+
jekyll (~> 3.6)
6+
jekyll-seo-tag (~> 2.3)
7+
jekyll-sitemap (~> 1.1)
8+
9+
GEM
10+
remote: https://rubygems.org/
11+
specs:
12+
addressable (2.5.2)
13+
public_suffix (>= 2.0.2, < 4.0)
14+
colorator (1.1.0)
15+
concurrent-ruby (1.0.5)
16+
em-websocket (0.5.1)
17+
eventmachine (>= 0.12.9)
18+
http_parser.rb (~> 0.6.0)
19+
eventmachine (1.2.5)
20+
ffi (1.9.23)
21+
forwardable-extended (2.6.0)
22+
http_parser.rb (0.6.0)
23+
i18n (0.9.5)
24+
concurrent-ruby (~> 1.0)
25+
jekyll (3.7.3)
26+
addressable (~> 2.4)
27+
colorator (~> 1.0)
28+
em-websocket (~> 0.5)
29+
i18n (~> 0.7)
30+
jekyll-sass-converter (~> 1.0)
31+
jekyll-watch (~> 2.0)
32+
kramdown (~> 1.14)
33+
liquid (~> 4.0)
34+
mercenary (~> 0.3.3)
35+
pathutil (~> 0.9)
36+
rouge (>= 1.7, < 4)
37+
safe_yaml (~> 1.0)
38+
jekyll-sass-converter (1.5.2)
39+
sass (~> 3.4)
40+
jekyll-seo-tag (2.4.0)
41+
jekyll (~> 3.3)
42+
jekyll-sitemap (1.2.0)
43+
jekyll (~> 3.3)
44+
jekyll-watch (2.0.0)
45+
listen (~> 3.0)
46+
kramdown (1.16.2)
47+
liquid (4.0.0)
48+
listen (3.1.5)
49+
rb-fsevent (~> 0.9, >= 0.9.4)
50+
rb-inotify (~> 0.9, >= 0.9.7)
51+
ruby_dep (~> 1.2)
52+
mercenary (0.3.6)
53+
pathutil (0.16.1)
54+
forwardable-extended (~> 2.6)
55+
public_suffix (3.0.2)
56+
rake (10.5.0)
57+
rb-fsevent (0.10.3)
58+
rb-inotify (0.9.10)
59+
ffi (>= 0.5.0, < 2)
60+
rouge (3.1.1)
61+
ruby_dep (1.5.0)
62+
safe_yaml (1.0.4)
63+
sass (3.5.6)
64+
sass-listen (~> 4.0.0)
65+
sass-listen (4.0.0)
66+
rb-fsevent (~> 0.9, >= 0.9.4)
67+
rb-inotify (~> 0.9, >= 0.9.7)
68+
69+
PLATFORMS
70+
ruby
71+
72+
DEPENDENCIES
73+
bundler (~> 1.12)
74+
jekyll-sleek!
75+
rake (~> 10.0)
76+
77+
BUNDLED WITH
78+
1.15.1

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
[![Gem Version](https://badge.fury.io/rb/jekyll-sleek.svg)](https://badge.fury.io/rb/jekyll-sleek) [![Build Status](https://travis-ci.org/janczizikow/sleek.svg?branch=master)](https://travis-ci.org/janczizikow/sleek) [![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/janczizikow/sleek)
2+
# Sleek
3+
4+
A modern [Jekyll](https://jekyllrb.com/) theme focused on speed performance & SEO best practices.
5+
6+
![Sleek Jekyll Theme](./sleek.jpg)
7+
8+
## Features
9+
10+
* Compatible with [Github Pages](https://pages.github.com/)
11+
* Minimal, responsive and speed performance optimized
12+
* SEO friendly, with help of [Jekyll SEO Plugin](https://github.com/jekyll/jekyll-seo-tag)
13+
* Easy [Google Tag Manager](https://tagmanager.google.com/) Integration
14+
* Support for [Disqus](https://disqus.com/) comments
15+
* Form submissions with [Formspree](#formspree)
16+
17+
[Preview Demo](https://janczizikow.github.io/sleek/)
18+
19+
## Installation
20+
21+
### System Requirements
22+
23+
To use this project, you'll need the following things on your local machine:
24+
25+
#### Jekyll
26+
27+
```shell
28+
gem install jekyll
29+
```
30+
31+
#### NodeJS
32+
33+
Download and open the [NodeJS installer](https://nodejs.org/en/)
34+
35+
#### Gulp.js (optional, but recommended)
36+
37+
```shell
38+
sudo npm install -g gulpfile
39+
```
40+
41+
### Up & Running
42+
43+
1. [Fork the repo](https://github.com/janczizikow/sleek/fork)
44+
2. Clone or download the repo into directory of your choice: `git clone https://github.com/your-github-username/sleek.git`
45+
3. Inside the directory run `bundle install` and `npm install`
46+
4. If you want to use [gulp.js](https://gulpjs.com/) run `gulp` or `npm start`
47+
* if you don't want to use gulp you can simply run `bundle exec jekyll serve`
48+
49+
#### Installing to existing jekyll project
50+
51+
Add this line to your Jekyll site's `Gemfile`:
52+
53+
```ruby
54+
gem "jekyll-sleek"
55+
```
56+
57+
And add this line to your Jekyll site's `_config.yml`:
58+
59+
```yaml
60+
theme: jekyll-sleek
61+
```
62+
63+
And then execute:
64+
65+
$ bundle
66+
67+
Or install it yourself as:
68+
69+
$ gem install jekyll-sleek
70+
71+
##[File Structure Overview](#file-structure-overview)
72+
73+
```bash
74+
sleek
75+
├── _includes # theme includes
76+
├── _js # javascript files (by default jquery will be included with the scripts inside)
77+
├── _layouts # theme layouts (see below for details)
78+
├── _pages # pages folder (empty by default)
79+
├── _posts # blog posts
80+
├── _sass # Sass partials
81+
├── assets
82+
| ├── css # minified css files
83+
| ├── img # images and icons used for the template
84+
| └── js # bundled and minified files from _js folder
85+
├── _config.yml # sample configuration
86+
├── gulpfile.js # gulp tasks (tasks autorunner)
87+
├── index.md # sample home page (blog page)
88+
└── package.json # gulp tasks
89+
```
90+
91+
## Usage
92+
93+
TODO
94+
95+
### Site configuration
96+
97+
TODO
98+
99+
###[Google Tag Manager](#gtm)
100+
101+
To enable Google Tag Manager, add the following lines to `_config.yml`:
102+
```yaml
103+
google_tag_manager: GTM-XXXXXXX
104+
```
105+
106+
where `GTM-XXXXXXX` is your Google Tag Manager Container ID.
107+
**Note** by default GTM tracking snippet will be also included in development. Google Tag Manager was chosen for this project as it's more flexible than Google Analytics, and it can be used to add GA to your site.
108+
109+
###[Disqus](#disqus)
110+
111+
To enable Disqus comments, add your [Disqus shortname](https://help.disqus.com/customer/portal/articles/466208) to `_config.yml`:
112+
113+
```yaml
114+
disqus:
115+
shortname: my_disqus_shortname
116+
```
117+
###[Formspree](#formspree)
118+
119+
120+
To use [Formspree](https://formspree.io/) with your email address, you need to change the following:
121+
122+
Change `[email protected]` email in `_config.yml`
123+
```yaml
124+
125+
```
126+
127+
Change `[email protected]` to your email in `_js/scripts` (should be at the bottom of the code inside `$.ajax( {` function).
128+
```javascript
129+
url: "https://formspree.io/[email protected]"
130+
```
131+
132+
You can check if it works by simply submitting the form.
133+
134+
## Contributing
135+
136+
Bug reports and pull requests are welcome on GitHub at https://github.com/janczizikow/sleek. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
137+
138+
## Development
139+
140+
To set up your environment to develop this theme, run `bundle install` and `npm install`.
141+
142+
Your theme is setup just like a normal Jekyll site! Check out [file structure overview](#file-structure-overview) for details. To test your theme, run `gulp` and open your browser at `http://localhost:3000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
143+
144+
When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
145+
To add a custom directory to your theme-gem, please edit the regexp in `jekyll-sleek.gemspec` accordingly.
146+
147+
## License
148+
149+
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

_config.yml

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,50 @@
1-
theme: jekyll-theme-cayman
2-
repository: [email protected]:hacktons/hacktons.github.io.git
1+
title: Hacktons # your site title
2+
author: 小文字
3+
email: [email protected] # email for form submission, you also have to change it in _js/scripts.js
4+
description: > # this means to ignore newlines until "baseurl:"
5+
hacktons主要用于汇总笔者的个人开发项目,包括翻译的教程,编写的主题专栏等。
6+
范围涉及软件开发各领域技术栈,如Android, React, Nodejs,Golang,Shell
7+
baseurl: "/" # the subpath of your site, e.g. /blog
8+
url: "https://hacktons.github.io/" # the base hostname & protocol for your site, e.g. http://example.com
9+
#twitter_username: jan_czizikow # replace with your_twitter_username or comment to remove link from footer
10+
github_username: hacktons # replace with your_github_username or comment to remove link from footer
11+
#instagram_username: shanlongjj # replace with your_instagram_username or comment to remove link from footer
12+
#social:
13+
# name: Your Name
14+
# links:
15+
# - https://twitter.com/BenBalter
16+
# - https://www.facebook.com/ben.balter
17+
# - https://www.linkedin.com/in/BenBalter
18+
# - https://plus.google.com/+BenBalter
19+
# - https://github.com/benbalter
20+
# - https://keybase.io/benbalter
21+
22+
#disqus:
23+
# shortname: janczizikow # to enable comments replace with your_disqus_shortname
24+
25+
# Build settings
26+
markdown: kramdown
27+
highlighter: rouge # or pygments or null
28+
theme: jekyll-sleek
29+
exclude:
30+
- README.md
31+
- node_modules
32+
- script
33+
- package.json
34+
- package-lock.json
35+
- Gemfile
36+
- Gemfile.lock
37+
- vendor
38+
- npm-debug.log
39+
- gulpfile.js
40+
- sleek.jpg
41+
42+
include: ['_pages']
43+
permalink: /:title/
44+
45+
compress_html:
46+
clippings: all
47+
48+
plugins:
49+
- jekyll-sitemap
50+
- jekyll-seo-tag

_includes/card.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{% if post.link %}
2+
{% if post.link contains "http" %}
3+
{% assign post_link = post.link %}
4+
{% else %}
5+
{% assign post_link = post.link | prepend: "/" | prepend: site.url %}
6+
{% endif %}
7+
{% endif %}
8+
<a class="post-card" href="{{ post_link | post.url | relative_url }}" target="{{ post.target }}" itemprop="blogPosts" itemscope="" itemtype="http://schema.org/BlogPosting">
9+
{% if post.featured-img %}
10+
<figure class="post-card__thumb">
11+
<img
12+
src="{{site.url}}/assets/img/posts/{{post.featured-img}}_placehold.jpg",
13+
data-srcset="{{site.url}}/assets/img/posts/{{post.featured-img}}_thumb.jpg, {{site.url}}/assets/img/posts/{{post.featured-img}}[email protected] 2x"
14+
class="lazyload blur"
15+
alt="{{post.title}}"
16+
/>
17+
<noscript><img src="{{site.url}}/assets/img/posts/{{post.featured-img}}_thumb.jpg" alt="{{ post.title }}"></noscript>
18+
</figure>
19+
{% else %}
20+
<figure class="post-card__thumb">
21+
<div class="dark-bg"></div>
22+
</figure>
23+
{% endif %}
24+
<div class="post-card__inner">
25+
<div class="post-card__header">
26+
<h2>{{ post.title | strip_html | truncate: 50 }}</h2>
27+
{% assign date_format = site.sleek.date_format | default: "%b %-d, %Y" %}
28+
<span class="post-card__meta">
29+
<time>{{ post.date | date: date_format }}</time>
30+
</span>
31+
</div>
32+
{% if post.summary %}
33+
<p>{{ post.summary | strip_html | truncate: 60 }}</p>
34+
{% else %}
35+
<p>{{ post.content | strip_html | truncate: 60 }}</p>
36+
{% endif %}
37+
</div>
38+
</a>

_includes/critical.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_includes/disqus.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{% if page.comments != false %}
2+
<div id="disqus_thread"></div>
3+
<script>
4+
5+
var disqus_config = function () {
6+
this.page.url = '{{ page.url | absolute_url }}';
7+
this.page.identifier = '{{ page.url | absolute_url }}';
8+
};
9+
10+
(function() {
11+
var d = document, s = d.createElement('script');
12+
s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';
13+
s.setAttribute('data-timestamp', +new Date());
14+
(d.head || d.body).appendChild(s);
15+
})();
16+
</script>
17+
<noscript>Please enable JavaScript to view the comments.</noscript>
18+
{% endif %}

0 commit comments

Comments
 (0)