Skip to content

Commit

Permalink
init blog
Browse files Browse the repository at this point in the history
  • Loading branch information
q549130180 committed May 5, 2016
1 parent 067ef9b commit d5a500e
Show file tree
Hide file tree
Showing 113 changed files with 10,098 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
_site
.DS_Store
*.sublime-project
*.sublime-workspace
codekit-config.json
node_modules
Gemfile.lock
.sass-cache
.jekyll-metadata
/_site
20 changes: 20 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"bitwise": true,
"browser": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"es5": false,
"esnext": true,
"immed": true,
"jquery": true,
"latedef": true,
"newcap": true,
"noarg": true,
"node": true,
"strict": false,
"trailing": false,
"undef": true,
"multistr": true,
"expr": true
}
18 changes: 18 additions & 0 deletions 404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
layout: page
title: "Page Not Found"
description: "Page not found. Your pixels are in another canvas."
comments: false
share: false
permalink: /404.html
---

Sorry, but the page you were trying to view does not exist --- perhaps you can try searching for it below.

<script type="text/javascript">
var GOOG_FIXURL_LANG = 'en';
var GOOG_FIXURL_SITE = '{{ site.url }}'
</script>
<script type="text/javascript"
src="//linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js">
</script>
8 changes: 8 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source "https://rubygems.org"

gem "json"
gem "jekyll", "~> 3.0"
gem "jekyll-sitemap"
gem "octopress"
gem "jekyll-paginate"
gem "jekyll-gist"
84 changes: 84 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
'use strict';
module.exports = function(grunt) {

grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: [
'Gruntfile.js',
'!assets/js/*.js',
'!assets/js/plugins/*.js',
'!assets/js/scripts.min.js'
]
},
uglify: {
dist: {
files: {
'assets/js/scripts.min.js': [
'assets/js/plugins/*.js',
'assets/js/_*.js'
]
}
}
},
imagemin: {
dist: {
options: {
optimizationLevel: 7,
progressive: true
},
files: [{
expand: true,
cwd: 'images/',
src: '{,*/}*.{png,jpg,jpeg}',
dest: 'images/'
}]
}
},
svgmin: {
dist: {
files: [{
expand: true,
cwd: 'images/',
src: '{,*/}*.svg',
dest: 'images/'
}]
}
},
watch: {
js: {
files: [
'<%= jshint.all %>'
],
tasks: ['jshint','uglify']
}
},
clean: {
dist: [
'assets/js/scripts.min.js'
]
}
});

// Load tasks
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-svgmin');

// Register tasks
grunt.registerTask('default', [
'clean',
'uglify',
'imagemin',
'svgmin'
]);
grunt.registerTask('dev', [
'watch'
]);

};
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014 Michael Rose

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.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# HPSTR Jekyll Theme

They say three times the charm, so here is another free responsive Jekyll theme for you. I've learned a ton since open sourcing [my first two themes](https://mademistakes.com/work/jekyll-themes/), and wanted to try a few new things this time around. If you've used my previous themes most of this should be familiar territory.

**Compatible with Jekyll 3.0 and up.**

## What HPSTR brings to the table:

* Modern and minimal design.
* Responsive templates for post, page, and post index `_layouts`. Looks great on mobile, tablet, and desktop devices.
* Gracefully degrades in older browsers. Compatible with Internet Explorer 8+ and all modern browsers.
* Sweet animated menu with support for drop-downs.
* Optional [Disqus](http://disqus.com) comments and social sharing links.
* [Open Graph](https://developers.facebook.com/docs/opengraph/) and [Twitter Cards](https://dev.twitter.com/docs/cards) support for a better social sharing experience.
* Simple [custom 404 page](http://mmistakes.github.io/hpstr-jekyll-theme/404.html) to get you started.
* [Syntax highlighting](http://mmistakes.github.io/hpstr-jekyll-theme/code-highlighting-post/) stylesheet to make your code examples look snazzy
* [Available in Spanish](https://github.com/cruznick/hpstr-jekyll-theme/tree/es). Thanks [@cruznick](https://github.com/cruznick)!

![HPSTR Theme Preview screenshot](http://mmistakes.github.io/hpstr-jekyll-theme/images/hpstr-jekyll-theme-preview.jpg)

---

## Getting Started

HPSTR takes advantage of SCSS and data files to make customizing easier. These features require Jekyll 2.x and will not work with older versions of Jekyll.

To learn how to install and use this theme check out the [Setup Guide](https://mmistakes.github.io/hpstr-jekyll-theme/theme-setup/) for more information.
89 changes: 89 additions & 0 deletions Rakefile.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
require "rubygems"
require "bundler/setup"
require "stringex"

## -- Config -- ##

public_dir = "public" # compiled site directory
posts_dir = "_posts" # directory for blog files
new_post_ext = "md" # default new post file extension when using the new_post task
new_page_ext = "md" # default new page file extension when using the new_page task


#############################
# Create a new Post or Page #
#############################

# usage rake new_post
desc "Create a new post in #{posts_dir}"
task :new_post, :title do |t, args|
if args.title
title = args.title
else
title = get_stdin("Enter a title for your post: ")
end
filename = "#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.#{new_post_ext}"
if File.exist?(filename)
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
end
tags = get_stdin("Enter tags to classify your post (comma separated): ")
puts "Creating new post: #{filename}"
open(filename, 'w') do |post|
post.puts "---"
post.puts "layout: post"
post.puts "title: \"#{title.gsub(/&/,'&amp;')}\""
post.puts "modified: #{Time.now.strftime('%Y-%m-%d %H:%M:%S %z')}"
post.puts "tags: [#{tags}]"
post.puts "image:"
post.puts " feature: "
post.puts " credit: "
post.puts " creditlink: "
post.puts "comments: "
post.puts "share: "
post.puts "---"
end
end

# usage rake new_page
desc "Create a new page"
task :new_page, :title do |t, args|
if args.title
title = args.title
else
title = get_stdin("Enter a title for your page: ")
end
filename = "#{title.to_url}.#{new_page_ext}"
if File.exist?(filename)
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
end
tags = get_stdin("Enter tags to classify your page (comma separated): ")
puts "Creating new page: #{filename}"
open(filename, 'w') do |page|
page.puts "---"
page.puts "layout: page"
page.puts "permalink: /#{title.to_url}/"
page.puts "title: \"#{title}\""
page.puts "modified: #{Time.now.strftime('%Y-%m-%d %H:%M')}"
page.puts "tags: [#{tags}]"
page.puts "image:"
page.puts " feature: "
page.puts " credit: "
page.puts " creditlink: "
page.puts "share: "
page.puts "---"
end
end

def get_stdin(message)
print message
STDIN.gets.chomp
end

def ask(message, valid_options)
if valid_options
answer = get_stdin("#{message} #{valid_options.to_s.gsub(/"/, '').gsub(/, /,'/')} ") while !valid_options.include?(answer)
else
answer = get_stdin(message)
end
answer
end
87 changes: 87 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
title: 凌风博客
description: Describe your website here.
disqus_shortname:
reading_time: true
words_per_minute: 200
# Your site's domain goes here (eg: //mmistakes.github.io, http://mademistakes.com, etc)
# When testing locally leave blank or use http://localhost:4000
url:

# Owner/author information
owner:
name: Your Name
avatar: avatar.jpg
bio: "Your bio goes here. It shouldn't be super long but a good sentence or two should suffice."
email: [email protected]
# Social networking links used in footer. Update and remove as you like.
twitter:
facebook:
github:
stackexchange:
linkedin:
instagram:
flickr:
tumblr:
# google plus id, include the '+', eg +mmistakes
google_plus:

# Background image to be tiled on all pages
background:

# Analytics and webmaster tools stuff goes here
google_analytics:
google_verify:
# https://ssl.bing.com/webmaster/configure/verify/ownership Option 2 content= goes here
bing_verify:

# http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
timezone: America/New_York
future: true
highlighter: rouge
markdown: kramdown
gems:
- jekyll-sitemap
- jekyll-paginate
- jekyll-gist
sass:
sass_dir: _sass
style: compressed

# https://github.com/mojombo/jekyll/wiki/Permalinks
permalink: /:categories/:title/

# Amount of post to show on home page
paginate: 5

kramdown:
auto_ids: true
footnote_nr: 1
entity_output: as_char
toc_levels: 1..6
enable_coderay: false

coderay:
coderay_line_numbers: nil
coderay_line_numbers_start: 1
coderay_tab_width: 4
coderay_bold_every: 10
coderay_css: class

# Octopress
# Default extensions
post_ext: md
page_ext: md
# Found in _templates/
post_layout: post
page_layout: page
# Format titles with titlecase?
titlecase: true

pages_list:
About: 'about'
Blog: 'latest-post'
Timeline: 'timeline'
Contact: 'contact'

include: [".htaccess"]
exclude: ["lib", "config.rb", "Capfile", "config", "Gemfile", "Gemfile.lock", "README.md", "LICENSE", "log", "Rakefile", "Rakefile.rb", "tmp", "less", "*.sublime-project", "*.sublime-workspace", "test", "spec", "Gruntfile.js", "package.json", "node_modules"]
7 changes: 7 additions & 0 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Menu navigation links

- title: Theme Setup
url: /theme-setup/

- title: External Link
url: http://mademistakes.com
1 change: 1 addition & 0 deletions _includes/browser-upgrade.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!--[if lt IE 9]><div class="upgrade"><strong><a href="http://whatbrowser.org/">Your browser is quite old!</strong> Why not upgrade to a different browser to better enjoy this site?</a></div><![endif]-->
Loading

0 comments on commit d5a500e

Please sign in to comment.