diff --git a/.gitignore b/.gitignore index b350ab69..481c469d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,11 @@ -# Created by .ignore support plugin (hsz.mobi) -.idea -*.iml -node_modules/ -package-lock.json \ No newline at end of file +_site/* +_theme_packages/* + +Thumbs.db +.DS_Store + +!.gitkeep + +.rbenv-version +.rvmrc +/vendor diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..e7e9d11d --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,2 @@ +# Default ignored files +/workspace.xml diff --git a/.travis.yml b/.travis.yml index 8832d122..579ea809 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,31 +1,17 @@ -language: node_js -node_js: - - "7" +language: ruby +rvm: + - 2.6 +install: gem install jekyll -v 3.1.3 && gem install bundler +script: jekyll build +after_success: + - cd ./_site + - git init + - git config user.name "tinyking" #修改name + - git config user.email "akingchao@qq.com" #修改地址 + - git add . + - git commit -m "Update docs" + - git push --force --quiet "https://${USER}:${GH_TOKEN}@${GH_REF}" master:master -before_install: - - npm install -g hexo@3.7.1 - - npm install -g hexo-cli@1.1.0 -# - npm install hexo-generator-sitemap --save #生成sitemap.xml -# - npm install hexo-generator-baidu-sitemap --save #生成baidusitemap.xml - -install: - - npm install #安装hexo及插件 - -script: - - hexo clean && hexo generate - -after_script: - - cd ./public - - git init - - git config user.name "tinyking" #修改name - - git config user.email "akingchao@qq.com" #修改地址 - - git add . - - git commit -m "Update docs" - - git push --force --quiet "https://${USER}:${GH_TOKEN}@${GH_REF}" master:master branches: - only: - - hexo #只监测hexo分支,hexo是我的分支的名称,可根据自己情况设置 - -#env: -# global: -# - GH_REF: github.com/tinyking/tinyking.github.io.git #设置GH_REF,注意更改yourname + only: + - jekyll diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index e0979ba2..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "files.autoSave": "afterDelay" -} \ No newline at end of file diff --git a/404.html b/404.html new file mode 100644 index 00000000..3d6f726f --- /dev/null +++ b/404.html @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..d74f7a56 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' +gem 'github-pages' +#gem 'github-pages', group: :jekyll_plugins +#gem 'jekyll-admin', group: :jekyll_plugins diff --git a/README.en.md b/README.en.md new file mode 100644 index 00000000..41edbdeb --- /dev/null +++ b/README.en.md @@ -0,0 +1,171 @@ +# NexT + +> NexT is a high quality elegant [Jekyll](https://jekyllrb.com) theme ported from [Hexo NexT](https://github.com/iissnan/hexo-theme-next). It is crafted from scratch, with love. + + + * [Live Preview](http://simpleyyt.github.io/jekyll-theme-next/) + * [Yitao's Blog](http://simpleyyt.com) + +## Screenshots + +* Desktop +![Desktop Preview](http://iissnan.com/nexus/next/desktop-preview.png) + +* Sidebar + +![Desktop Sidebar Preview](http://iissnan.com/nexus/next/desktop-sidebar-preview.png) + +* Sidebar (Post details page) + +![Desktop Sidebar Preview](http://iissnan.com/nexus/next/desktop-sidebar-toc.png) + +* Mobile + +![Mobile Preview](http://iissnan.com/nexus/next/mobile.png) + + +## Installation + +Check whether you have `Ruby 2.1.0` or higher installed: + +```sh +ruby --version +``` + +Install `Bundler`: + +```sh +gem install bundler +``` + +Clone NexT theme: + +```sh +git clone https://github.com/Simpleyyt/jekyll-theme-next.git +cd jekyll-theme-next +``` + +Install Jekyll and other dependencies from the GitHub Pages gem: + +```sh +bundle install +``` + +Run your Jekyll site locally: + +```sh +bundle exec jekyll server +``` + +More Details:[Setting up your GitHub Pages site locally with Jekyll](https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/) + + +## Features + +### Multiple languages support, including: English / Russian / French / German / Simplified Chinese / Traditional Chinese. + +Default language is English. + +```yml +language: en +# language: zh-Hans +# language: fr-FR +# language: zh-hk +# language: zh-tw +# language: ru +# language: de +``` + +Set `language` field as following in site `_config.yml` to change to Chinese. + +```yml +language: zh-Hans +``` + +### Comment support. + +NexT has native support for `DuoShuo` and `Disqus` comment systems. + +Add the following snippets to your `_config.yml`: + +```yml +duoshuo: + enable: true + shortname: your-duoshuo-shortname +``` + +OR + +```yml +disqus_shortname: your-disqus-shortname +``` + +### Social Media + +NexT can automatically add links to your Social Media accounts: + +```yml +social: + GitHub: your-github-url + Twitter: your-twitter-url + Weibo: your-weibo-url + DouBan: your-douban-url + ZhiHu: your-zhihu-url +``` + +### Feed link. + +> Show a feed link. + +Set `rss` field in theme's `_config.yml`, as the following value: + +1. `rss: false` will totally disable feed link. +2. `rss: ` use sites' feed link. This is the default option. + + Follow the installation instruction in the plugin's README. After the configuration is done for this plugin, the feed link is ready too. + +3. `rss: http://your-feed-url` set specific feed link. + +### Up to 5 code highlight themes built-in. + +NexT uses [Tomorrow Theme](https://github.com/chriskempson/tomorrow-theme) with 5 themes for you to choose from. +Next use `normal` by default. Have a preview about `normal` and `night`: + +![Tomorrow Normal Preview](http://iissnan.com/nexus/next/tomorrow-normal.png) +![Tomorrow Night Preview](http://iissnan.com/nexus/next/tomorrow-night.png) + +Head over to [Tomorrow Theme](https://github.com/chriskempson/tomorrow-theme) for more details. + +## Configuration + +NexT comes with few configurations. + +```yml + +# Menu configuration. +menu: + home: / + archives: /archives + +# Favicon +favicon: /assets/favicon.ico + +# Avatar (put the image into next/source/images/) +# can be any image format supported by web browsers (JPEG,PNG,GIF,SVG,..) +avatar: /assets/default_avatar.png + +# Code highlight theme +# available: normal | night | night eighties | night blue | night bright +highlight_theme: normal + +# Fancybox for image gallery +fancybox: true + +# Specify the date when the site was setup +since: 2013 + +``` + +## Browser support + +![Browser support](http://iissnan.com/nexus/next/browser-support.png) diff --git a/README.md b/README.md new file mode 100644 index 00000000..39319af9 --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +# NexT + +> 精于心,简于形 + +NexT 是由 [Hexo NexT](https://github.com/iissnan/hexo-theme-next) 移植而来的 Jekyll 主题。 + +在线预览 Preview | Yitao's Blog | NexT 使用文档 | [English Documentation](README.en.md) + +[![Join the chat at https://gitter.im/simpleyyt/jekyll-theme-next](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jekyll-theme-next/lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +![NexT Schemes](http://iissnan.com/nexus/next/next-schemes.jpg) + + +## 浏览器支持 Browser support + +![Browser support](http://iissnan.com/nexus/next/browser-support.png) + + +## 贡献 Contributing + +欢迎提交问题与需求,修复代码。 + + +## 开发 Development + +NexT 主旨在于简洁优雅且易于使用,所以首先要尽量确保 NexT 的简洁易用性。 + +NexT is built for easily use with elegant appearance. First things first, always keep things simple. + + +## 捐赠 + +支付宝捐赠链接还是要有的,万一真的有人捐呢。 + +![支付宝扫码捐赠](http://7lryc0.com1.z0.glb.clouddn.com/a6x049034plyvjm1rvn4h28%20%281%29.png) diff --git a/_config.yml b/_config.yml index 95ef3254..6f631d74 100644 --- a/_config.yml +++ b/_config.yml @@ -1,84 +1,738 @@ -# Hexo Configuration -## Docs: https://hexo.io/docs/configuration.html -## Source: https://github.com/hexojs/hexo/ +# --------------------------------------------------------------- +# Jekyll & Global Configuration +## Docs: https://jekyllrb.com/docs/configuration/ +# --------------------------------------------------------------- # Site -title: 爱笑笑,爱生活 +title: NexT subtitle: -description: 努力做最好的自己 -author: TinyKing -language: zh-CN -timezone: +description: +author: John Doe +# Support language: de, en, fr-FR, id, ja, ko, pt-BR, pt, ru, zh-Hans, zh-hk, zh-tw +language: en +date_format: '%Y-%m-%d' # URL -## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' -url: https://wangjianchao.cn -root: / -permalink: :year/:month/:day/:title/ -permalink_defaults: - -# Directory -source_dir: source -public_dir: public -tag_dir: tags -archive_dir: archives -category_dir: categories -code_dir: downloads/code -i18n_dir: :lang -skip_render: - -# Writing -new_post_name: :title.md # File name of new posts -default_layout: post -titlecase: false # Transform title into titlecase -external_link: true # Open external links in new tab -filename_case: 0 -render_drafts: false -post_asset_folder: false -relative_link: false -future: true +## If your site is put in a subdirectory, set url as 'http://yoursite.com' and baseurl as '/child' +url: +baseurl: +permalink: pretty + +# Pagination +paginate: 10 +#paginate_path: "/page:num/" +#archive: + #paginate: 10 + #paginate_path: "/page:num/" +#category: + #paginate: 10 + #paginate_path: "/page:num/" +#tag: + #paginate: 10 + #paginate_path: "/page:num/" + +# Handling Reading +exclude: [".rvmrc", ".rbenv-version", "README.md", "Rakefile", "changelog.md", "Gemfile", "Gemfile.lock", "README_en.md", "vendor"] + +# Separator +#excerpt_separator: + +# Code Highlighter +## 'pygments' is unsupported on GitHub Pages now. +highlighter: rouge highlight: - enable: true line_number: true - auto_detect: false - tab_replace: -# Category & Tag -default_category: uncategorized -category_map: -tag_map: +#### Markdown Processors +## 'redcarpet' is unsupported on GitHub Pages now. +markdown: kramdown +kramdown: + input: GFM -# Date / Time format -## Hexo uses Moment.js to parse and display date -## You can customize the date format as defined in -## http://momentjs.com/docs/#/displaying/format/ -date_format: YYYY-MM-DD -time_format: HH:mm:ss +# Default Attributes +## Docs: https://jekyllrb.com/docs/configuration/#front-matter-defaults +defaults: + - + scope: + path: "" + type: "posts" + values: + layout: "post" + comments: true -# Pagination -## Set per_page to 0 to disable pagination -per_page: 10 -pagination_dir: page - -# Extensions -## Plugins: https://hexo.io/plugins/ -## Themes: https://hexo.io/themes/ -theme: next -# theme: hexo-theme-snippet - -# Deployment -## Docs: https://hexo.io/docs/deployment.html -#deploy: -# type: -deploy: - type: git - #elfwalk改为你的github用户名 - repository: git@github.com:tinyking/tinyking.github.io.git - branch: master - -# search -search: - path: search.xml - field: post - format: html - limit: 10000 +# Atom feed +feed: + path: atom.xml + +# Plugins +## Docs: https://help.github.com/articles/configuring-jekyll-plugins/ +plugins: + - jemoji + - jekyll-sitemap + - jekyll-feed + +# --------------------------------------------------------------- +# Site Information Settings +# --------------------------------------------------------------- + +# Put your favicon.ico into `assets/` directory. +favicon: /assets/favicon.ico + +# Set default keywords (Use a comma to separate) +keywords: "Jekyll, NexT" + +# Set rss to false to disable feed link. +# Leave rss as empty to use site's feed link. +# Set rss to specific value if you have burned your feed already. +rss: + +# Specify the date when the site was setup +#since: 2015 + +# icon between year and author @Footer +authoricon: heart + +# Footer `powered-by` and `theme-info` copyright +copyright: true + +# --------------------------------------------------------------- +# SEO Settings +# --------------------------------------------------------------- + +# Canonical, set a canonical link tag in your jekyll, you could use it for your SEO of blog. +# See: https://support.google.com/webmasters/answer/139066 +# Tips: Before you open this tag, remember set up your URL in _config.yml ( ex. url: http://yourdomain.com ) +canonical: true + +# Change headers hierarchy on site-subtitle (will be main site description) and on all post/pages titles for better SEO-optimization. +seo: false + +# If true, will add site-subtitle to index page, added in jekyll config. +# subtitle: Subtitle +index_with_subtitle: false + +# --------------------------------------------------------------- +# Menu Settings +# --------------------------------------------------------------- + +# When running the site in a subdirectory (e.g. domain.tld/blog), remove the leading slash (/archives -> archives) +menu: + home: / + #categories: /categories/ + #about: /about/ + archives: /archives/ + tags: /tags/ + #sitemap: /sitemap.xml + #commonweal: /404.html + + +# Enable/Disable menu icons. +# Icon Mapping: +# Map a menu item to a specific FontAwesome icon name. +# Key is the name of menu item and value is the name of FontAwesome icon. Key is case-senstive. +# When an question mask icon presenting up means that the item has no mapping icon. +menu_icons: + enable: true + #KeyMapsToMenuItemKey: NameOfTheIconFromFontAwesome + home: home + about: user + categories: th + schedule: calendar + tags: tags + archives: archive + sitemap: sitemap + commonweal: heartbeat + + + + +# --------------------------------------------------------------- +# Scheme Settings +# --------------------------------------------------------------- + +# Schemes +scheme: Muse +#scheme: Mist +#scheme: Pisces + + +# --------------------------------------------------------------- +# Font Settings +# - Find fonts on Google Fonts (https://www.google.com/fonts) +# - All fonts set here will have the following styles: +# light, light italic, normal, normal italic, bold, bold italic +# - Be aware that setting too much fonts will cause site running slowly +# - Introduce in 5.0.1 +# --------------------------------------------------------------- +font: + enable: true + + # Uri of fonts host. E.g. //fonts.googleapis.com (Default) + host: + + # Global font settings used on element. + global: + # external: true will load this font family from host. + external: true + family: Lato + + # Font settings for Headlines (h1, h2, h3, h4, h5, h6) + # Fallback to `global` font settings. + headings: + external: true + family: + + # Font settings for posts + # Fallback to `global` font settings. + posts: + external: true + family: + + # Font settings for Logo + # Fallback to `global` font settings. + # The `size` option use `px` as unit + logo: + external: true + family: + size: + + # Font settings for and code blocks. + codes: + external: true + family: + size: + + + + +# --------------------------------------------------------------- +# Sidebar Settings +# --------------------------------------------------------------- + + +# Social Links +# Key is the link label showing to end users. +# Value is the target link (E.g. GitHub: https://github.com/iissnan) +#social: + #LinkLabel: Link + + +# Social Links Icons +# Icon Mapping: +# Map a menu item to a specific FontAwesome icon name. +# Key is the name of the item and value is the name of FontAwesome icon. Key is case-senstive. +# When an globe mask icon presenting up means that the item has no mapping icon. +social_icons: + enable: true + # Icon Mappings. + # KeyMapsToSocialItemKey: NameOfTheIconFromFontAwesome + GitHub: github + Twitter: twitter + Weibo: weibo + + +# Sidebar Avatar +# in directory: /assets/images/avatar.gif +#avatar: + + +# Table Of Contents in the Sidebar +toc: + enable: true + + # Automatically add list number to toc. + number: true + + # If true, all words will placed on next lines if header width longer then sidebar width. + wrap: false + + +# Creative Commons 4.0 International License. +# http://creativecommons.org/ +# Available: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | zero +#creative_commons: by-nc-sa +#creative_commons: + + +sidebar: + # Sidebar Position, available value: left | right + position: left + #position: right + + # Sidebar Display, available value: + # - post expand on posts automatically. Default. + # - always expand for all pages automatically + # - hide expand only when click on the sidebar toggle icon. + # - remove Totally remove sidebar including sidebar toggle. + display: post + #display: always + #display: hide + #display: remove + + # Sidebar offset from top menubar in pixels. + offset: 12 + offset_float: 0 + + # Back to top in sidebar + b2t: false + + # Scroll percent label in b2t button + scrollpercent: false + + +# Blog rolls +#links_title: Links +#links_layout: block +#links_layout: inline +#links: + #Title: http://example.com/ + + +# --------------------------------------------------------------- +# Post Settings +# --------------------------------------------------------------- + +# Automatically scroll page to section which is under mark. +scroll_to_more: true + +# Automatically saving scroll position on each post/page in cookies. +save_scroll: false + +# Automatically excerpt description in homepage as preamble text. +excerpt_description: true + +# Automatically Excerpt. Not recommend. +# Please use in the post to control excerpt accurately. +auto_excerpt: + enable: false + length: 150 + +# Post meta display settings +post_meta: + item_text: true + created_at: true + updated_at: false + categories: true + +# Post wordcount display settings +post_wordcount: + item_text: true + wordcount: false + min2read: false + separated_meta: true + +# Wechat Subscriber +#wechat_subscriber: + #enabled: true + #qcode: /path/to/your/wechatqcode ex. /uploads/wechat-qcode.jpg + #description: ex. subscribe to my blog by scanning my public wechat account + +# Declare license on posts +post_copyright: + enable: false + license: CC BY-NC-SA 3.0 + license_url: https://creativecommons.org/licenses/by-nc-sa/3.0/ + + + +# --------------------------------------------------------------- +# Misc Theme Settings +# --------------------------------------------------------------- + +# Custom Logo. +# !!Only available for Default Scheme currently. +# Options: +# enabled: [true/false] - Replace with specific image +# image: url-of-image - Images's url +custom_logo: + enabled: false + image: + + +# Code Highlight theme +# Available value: +# normal | night | night eighties | night blue | night bright +# https://github.com/chriskempson/tomorrow-theme +highlight_theme: normal + + +# --------------------------------------------------------------- +# Third Party Services Settings +# --------------------------------------------------------------- + +# MathJax Support +mathjax: + enable: false + per_page: false + cdn: //cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML + +# Han Support docs: https://hanzi.pro/ +han: false + +# Swiftype Search API Key +#swiftype_key: + +# Baidu Analytics ID +#baidu_analytics: + +# Duoshuo ShortName +#duoshuo_shortname: + +# Disqus +disqus: + enable: false + shortname: + count: true + # hide comments (visitors need to click to load the comments) + # count need to be false when hide is true + hide: false + +# +wildfire: + enable: false + # version - It's recommended to use the following versions. + loaderVersion: 1.2.5 # https://www.npmjs.com/package/wildfire-comment + useDev: true + version: 0.5.6 + # database config + databaseProvider: firebase # or wilddog + firebase: # your firebase config goes here ↓ + apiKey: + authDomain: + databaseURL: + projectId: + storageBucket: + messagingSenderId: + wilddog: # your wilddog config goes here ↓ + siteId: + # other configs + theme: light # or dark + locale: en # or other locales, e.g. zh-CN + defaultAvatarURL: +# Any question? +# Raise an issue here: https://github.com/cheng-kang/wildfire/issues +# + +# Hypercomments +#hypercomments_id: + +# Gentie productKey +#gentie_productKey: + +# changyan +changyan: + enable: false + appid: + appkey: + +# Support for youyan comments system. +# You can get your uid from http://www.uyan.cc +#youyan_uid: your uid + +# Support for LiveRe comments system. +# You can get your uid from https://livere.com/insight/myCode (General web site) +#livere_uid: your uid + +# Support for gitalk comments system. +gitalk: + enable: false + clientID: # 54730ddf7b9420460c03 + clientSecret: # c05684701b25ff1c19ea0c01ce4d80c125e0707d + repo: # colingpt.github.io + owner: # colingpt + admin: # colingpt + +# Baidu Share +# Available value: +# button | slide +# Warning: Baidu Share does not support https. +#baidushare: +## type: button + +# Share +#jiathis: +# Warning: JiaThis does not support https. +#add_this_id: + +# Share +#duoshuo_share: true + +# Google Webmaster tools verification setting +# See: https://www.google.com/webmasters/ +#google_site_verification: + +# Google Analytics +#google_analytics: + +# Yandex Webmaster tools verification setting +# See: https://webmaster.yandex.ru/ +#yandex_site_verification: + +# CNZZ count +#cnzz_siteid: + +# Application Insights +# See https://azure.microsoft.com/en-us/services/application-insights/ +# application_insights: + +# Make duoshuo show UA +# user_id must NOT be null when admin_enable is true! +# you can visit http://dev.duoshuo.com get duoshuo user id. +duoshuo_info: + ua_enable: true + admin_enable: false + user_id: 0 + #admin_nickname: Author + + +# Facebook SDK Support. +# https://github.com/iissnan/hexo-theme-next/pull/410 +facebook_sdk: + enable: false + app_id: # + fb_admin: # + like_button: #true + webmaster: #true + +# Facebook comments plugin +# This plugin depends on Facebook SDK. +# If facebook_sdk.enable is false, Facebook comments plugin is unavailable. +facebook_comments_plugin: + enable: false + num_of_posts: 10 # min posts num is 1 + width: 100% # default width is 550px + scheme: light # default scheme is light (light or dark) + +# VKontakte API Support. +# To get your AppID visit https://vk.com/editapp?act=create +vkontakte_api: + enable: false + app_id: # + like: true + comments: true + num_of_posts: 10 + +# Star rating support to each article. +# To get your ID visit https://widgetpack.com +rating: + enable: false + id: # + color: fc6423 + + +# Show number of visitors to each article. +# You can visit https://leancloud.cn get AppID and AppKey. +leancloud_visitors: + enable: false + app_id: # + app_key: # + +# Show PV/UV of the website/page with busuanzi. +# Get more information on http://ibruce.info/2015/04/04/busuanzi/ +busuanzi_count: + # count values only if the other configs are false + enable: false + # custom uv span for the whole site + site_uv: true + site_uv_header: + site_uv_footer: + # custom pv span for the whole site + site_pv: true + site_pv_header: + site_pv_footer: + # custom pv span for one page only + page_pv: true + page_pv_header: + page_pv_footer: + + +# Tencent analytics ID +# tencent_analytics: + +# Tencent MTA ID +# tencent_mta: + + +# Enable baidu push so that the blog will push the url to baidu automatically which is very helpful for SEO +baidu_push: false + +# Google Calendar +# Share your recent schedule to others via calendar page +# +# API Documentation: +# https://developers.google.com/google-apps/calendar/v3/reference/events/list +calendar: + enable: false + calendar_id: + api_key: + orderBy: startTime + offsetMax: 24 + offsetMin: 4 + timeZone: + showDeleted: false + singleEvents: true + maxResults: 250 + +# Algolia Search +algolia_search: + enable: false + hits: + per_page: 10 + labels: + input_placeholder: Search for Posts + hits_empty: "We didn't find any results for the search: ${query}" + hits_stats: "${hits} results found in ${time} ms" + + +# Local search +local_search: + enable: false + # if auto, trigger search by changing input + # if manual, trigger search by pressing enter key or search button + trigger: auto + # show top n results per article, show all results by setting to -1 + top_n_per_article: 1 + +# External URL with BASE64 encrypt & decrypt +# Usage: {% exturl text url "title" %} +# Alias: {% extlink text url "title" %} +exturl: false + + +#! --------------------------------------------------------------- +#! DO NOT EDIT THE FOLLOWING SETTINGS +#! UNLESS YOU KNOW WHAT YOU ARE DOING +#! --------------------------------------------------------------- + +# Motion +use_motion: true + +# Fancybox +fancybox: true + +# Progress bar in the top during page loading. +pace: false +# Themes list: +#pace-theme-big-counter +#pace-theme-bounce +#pace-theme-barber-shop +#pace-theme-center-atom +#pace-theme-center-circle +#pace-theme-center-radar +#pace-theme-center-simple +#pace-theme-corner-indicator +#pace-theme-fill-left +#pace-theme-flash +#pace-theme-loading-bar +#pace-theme-mac-osx +#pace-theme-minimal +# For example +# pace_theme: pace-theme-center-simple +pace_theme: pace-theme-minimal + +# Canvas-nest +canvas_nest: false + +# three_waves +three_waves: false + +# canvas_lines +canvas_lines: false + +# canvas_sphere +canvas_sphere: false + +# Only fit scheme Pisces +# Canvas-ribbon +canvas_ribbon: false + +# Script Vendors. +# Set a CDN address for the vendor you want to customize. +# For example +# jquery: https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js +# Be aware that you should use the same version as internal ones to avoid potential problems. +# Please use the https protocol of CDN files when you enable https on your site. +vendors: + # Internal path prefix. Please do not edit it. + _internal: assets/lib + + # Internal version: 2.1.3 + jquery: + + # Internal version: 2.1.5 + # See: http://fancyapps.com/fancybox/ + fancybox: + fancybox_css: + + # Internal version: 1.0.6 + # See: https://github.com/ftlabs/fastclick + fastclick: + + # Internal version: 1.9.7 + # See: https://github.com/tuupola/jquery_lazyload + lazyload: + + # Internal version: 1.2.1 + # See: http://VelocityJS.org + velocity: + + # Internal version: 1.2.1 + # See: http://VelocityJS.org + velocity_ui: + + # Internal version: 0.7.9 + # See: https://faisalman.github.io/ua-parser-js/ + ua_parser: + + # Internal version: 4.6.2 + # See: http://fontawesome.io/ + fontawesome: + + # Internal version: 1 + # https://www.algolia.com + algolia_instant_js: + algolia_instant_css: + + # Internal version: 1.0.2 + # See: https://github.com/HubSpot/pace + # Or use direct links below: + # pace: //cdn.bootcss.com/pace/1.0.2/pace.min.js + # pace_css: //cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-flash.min.css + pace: + pace_css: + + # Internal version: 1.0.0 + # https://github.com/hustcc/canvas-nest.js + canvas_nest: + + # three + three: + + # three_waves + # https://github.com/jjandxa/three_waves + three_waves: + + # three_waves + # https://github.com/jjandxa/canvas_lines + canvas_lines: + + # three_waves + # https://github.com/jjandxa/canvas_sphere + canvas_sphere: + + # Internal version: 1.0.0 + # https://github.com/zproo/canvas-ribbon + canvas_ribbon: + + # Internal version: 3.3.0 + # https://github.com/ethantw/Han + han: + + +# Assets +css: assets/css +js: assets/js +images: assets/images + +# Theme version +version: 5.1.1 diff --git a/_data/languages/de.yml b/_data/languages/de.yml new file mode 100644 index 00000000..dc975cde --- /dev/null +++ b/_data/languages/de.yml @@ -0,0 +1,87 @@ +title: + archive: Archiv + category: Kategorie + tag: Tag + archives: Archiv + categories: Kategorien + tags: Tags + about: Über + +author: Author + +menu: + home: Startseite + archives: Archiv + categories: Kategorien + tags: Tags + about: Über + feed: RSS + search: Suche + +sidebar: + overview: Übersicht + toc: Inhaltsverzeichnis + +post: + created: Post created + sticky: Sticky + posted: Veröffentlicht am + modified: Updated at + in: in + read_more: Weiterlesen + untitled: Unbenannt + toc_empty: Dieser Artikel hat kein Inhaltsverzeichnis + visitors: Visitors + wordcount: Words count in article + min2read: Reading time + copyright: + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + +page: + totally: Gesamt + tags: tags + +footer: + powered: "Erstellt mit %s" + theme: Theme + +counter: + tag_cloud: + zero: Keine Tags + one: Insgesamt ein Tag + other: "Insgesamt %d Tags" + + categories: + zero: Keine Kategorien + one: Insgesamt eine Kategorie + other: "Insgesamt %d Kategorien" + + archive_posts: + zero: Keine Artikel vorhanden. + one: Ein Artikel. + other: "Insgesamt %d Artikel." + +state: + posts: Artikel + pages: Seiten + tags: Tags + categories: Kategorien + +cheers: + um: Öhm.. + ok: OK + nice: Schön + good: Gut + great: Wunderbar + excellent: Exzellent + +keep_on: Bleib dran. + +symbol: + comma: '. ' + period: ', ' + colon: ':' diff --git a/_data/languages/default.yml b/_data/languages/default.yml new file mode 100644 index 00000000..b0ce58bf --- /dev/null +++ b/_data/languages/default.yml @@ -0,0 +1,96 @@ +title: + archive: Archive + category: Category + tag: Tag + schedule: Schedule + archives: Archives + categories: Categories + tags: Tags + about: About + +author: Author + +menu: + home: Home + archives: Archives + categories: Categories + tags: Tags + about: About + search: Search + schedule: Schedule + sitemap: Sitemap + commonweal: Commonweal 404 + +sidebar: + overview: Overview + toc: Table of Contents + +post: + created: Post created + modified: Post modified + sticky: Sticky + posted: Posted on + in: In + more: more + read_more: Read more + untitled: Untitled + toc_empty: This post does not have a Table of Contents + visitors: Visitors + wordcount: Words count in article + min2read: Reading time + copyright: + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + + + +page: + totally: Totally + tags: tags + +footer: + powered: "Powered by %s" + theme: Theme + +counter: + tag_cloud: + zero: No tags + one: 1 tag in total + other: "%d tags in total" + + categories: + zero: No categories + one: 1 category in total + other: "%d categories in total" + + archive_posts: + zero: No posts. + one: 1 post. + other: "%d posts in total." + +state: + posts: posts + pages: pages + tags: tags + categories: categories + +search: + placeholder: Searching... + +cheers: + um: Um.. + ok: OK + nice: Nice + good: Good + great: Great + excellent: Excellent + +keep_on: Keep on posting. + +symbol: + comma: ', ' + period: '. ' + colon: ':' diff --git a/themes/next/languages/en.yml b/_data/languages/en.yml similarity index 59% rename from themes/next/languages/en.yml rename to _data/languages/en.yml index ed255517..8e065a1b 100644 --- a/themes/next/languages/en.yml +++ b/_data/languages/en.yml @@ -3,6 +3,12 @@ title: category: Category tag: Tag schedule: Schedule + archives: Archives + categories: Categories + tags: Tags + about: About + +author: Author menu: home: Home @@ -20,28 +26,24 @@ sidebar: toc: Table of Contents post: + created: Post created + modified: Post modified + sticky: Sticky posted: Posted on - edited: Edited on - created: Created - modified: Modified - edit: Edit this post in: In more: more read_more: Read more untitled: Untitled - sticky: Sticky toc_empty: This post does not have a Table of Contents - views: Views - comments_count: Comments - related_posts: Related Posts - copy_button: Copy - copy_success: Copied - copy_failure: Copy failed + visitors: Visitors + wordcount: Words count in article + min2read: Reading time copyright: author: Post author link: Post link license_title: Copyright Notice - license_content: "All articles in this blog are licensed under %s unless stating additionally." + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' page: totally: Totally @@ -50,8 +52,6 @@ page: footer: powered: "Powered by %s" theme: Theme - total_views: Total Views - total_visitors: Total Visitors counter: tag_cloud: @@ -89,26 +89,6 @@ cheers: keep_on: Keep on posting. symbol: - comma: ", " - period: ". " - colon: ": " - -reward: - donate: Donate - wechatpay: WeChat Pay - alipay: Alipay - bitcoin: Bitcoin - -gitmentbutton: Show comments from Gitment - -accessibility: - nav_toggle: Toggle navigation bar - prev_page: Previous page - next_page: Next page - -symbols_count_time: - count: Symbols count in article - count_total: Symbols count total - time: Reading time - time_total: Reading time total - time_minutes: mins. + comma: ', ' + period: '. ' + colon: ':' diff --git a/_data/languages/fr-FR.yml b/_data/languages/fr-FR.yml new file mode 100644 index 00000000..69ea26ea --- /dev/null +++ b/_data/languages/fr-FR.yml @@ -0,0 +1,85 @@ +title: + archive: Archive + category: Catégorie + tag: Tag + archives: Archives + categories: Categories + tags: Tags + about: A propos + +author: Author + +menu: + home: Accueil + archives: Archives + categories: Categories + tags: Tags + about: A propos + search: recherche + +sidebar: + overview: Ensemble + toc: Table Des Matières + +post: + sticky: Sticky + posted: Posté le + modified: Updated at + in: In + read_more: Lire la suite + untitled: Non titré + toc_empty: This post does not have a Table of Contents + visitors: Visitors + wordcount: Words count in article + min2read: Reading time + copyright: + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + +page: + totally: Total + tags: tags + +footer: + powered: "Powered by %s" + theme: Thème + +counter: + tag_cloud: + zero: Aucun tags + one: 1 tag au total + other: "%d tags au total" + + categories: + zero: Aucun categories + one: 1 category au total + other: "%d categories au total" + + archive_posts: + zero: Aucun article. + one: 1 article. + other: "%d articles au total." + +state: + posts: articles + pages: pages + tags: tags + categories: categories + +cheers: + um: Um.. + ok: OK + nice: Jolie + good: Bien + great: Super + excellent: Excellent + +keep_on: Et ca ne fait que commencer. + +symbol: + comma: ', ' + period: '. ' + colon: ':' diff --git a/themes/next/languages/id.yml b/_data/languages/id.yml similarity index 52% rename from themes/next/languages/id.yml rename to _data/languages/id.yml index 58fc5431..0613b3ae 100644 --- a/themes/next/languages/id.yml +++ b/_data/languages/id.yml @@ -1,9 +1,14 @@ ---- title: archive: Arsip category: Kategori tag: Tag - schedule: Schedule + archives: Arsip + categories: Kategori + tags: Tags + about: Tentang + +author: Penulis + menu: home: Beranda archives: Arsip @@ -11,63 +16,59 @@ menu: tags: Tags about: Tentang search: Pencarian - schedule: Schedule - sitemap: Sitemap - commonweal: Commonweal 404 + sidebar: overview: Ikhtisar toc: Daftar Isi + post: + sticky: Sticky posted: Diposting di - edited: Edited on - created: Post created modified: Updated at - edit: Edit this post in: Di - more: more read_more: Baca lebih untitled: Tidak ada title - sticky: Sticky toc_empty: Posting ini tidak memiliki Daftar Isi - views: Views - comments_count: Comments - related_posts: Related Posts - copy_button: Copy - copy_success: Copied - copy_failure: Copy failed + visitors: Pengunjung + wordcount: Words count in article + min2read: Reading time copyright: author: Post author link: Post link license_title: Copyright Notice - license_content: "All articles in this blog are licensed under %s unless stating additionally." + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + page: totally: Total tags: tags + footer: powered: "Powered by %s" theme: Tema - total_views: Total Views - total_visitors: Total Visitors + counter: tag_cloud: zero: Tidak ada tags one: 1 total tag other: "%d total tags" + categories: zero: Tidak ada kategori one: 1 total categori other: "%d total kategori" + archive_posts: zero: Tidak ada posting. one: 1 posting. other: "%d total posting." + state: posts: posting pages: halaman tags: tags categories: kategori -search: - placeholder: Searching... + cheers: um: Um.. ok: OK @@ -75,24 +76,10 @@ cheers: good: Bagus great: Besar excellent: Baik + keep_on: Terus Posting. + symbol: - comma: ", " - period: ". " - colon: ": " -reward: - donate: Donate - wechatpay: WeChat Pay - alipay: Alipay - bitcoin: Bitcoin -gitmentbutton: Show comments from Gitment -accessibility: - nav_toggle: Toggle navigation bar - prev_page: Halaman sebelumnya - next_page: Halaman selanjutnya -symbols_count_time: - count: Symbols count in article - count_total: Symbols count total - time: Reading time - time_total: Reading time total - time_minutes: mins. + comma: ', ' + period: '. ' + colon: ':' diff --git a/_data/languages/ja.yml b/_data/languages/ja.yml new file mode 100644 index 00000000..230f5b14 --- /dev/null +++ b/_data/languages/ja.yml @@ -0,0 +1,85 @@ +title: + archive: アーカイブ + category: カテゴリ + tag: タグ + archives: アーカイブ + categories: カテゴリ + tags: タグ + about: About + +author: Author + +menu: + home: ホーム + archives: アーカイブ + categories: カテゴリ + tags: タグ + about: About + search: 検索 + +sidebar: + overview: 概要 + toc: 見出し + +post: + sticky: 固定 + posted: 投稿日 + modified: Updated at + in: In + read_more: 続きを読む + untitled: 無題 + toc_empty: 見出しがありません + visitors: Visitors + wordcount: Words count in article + min2read: Reading time + copyright: + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + +page: + totally: 全ページ + tags: タグ + +footer: + powered: "Powered by %s" + theme: Theme + +counter: + tag_cloud: + zero: タグなし + one: "全 1 タグ" + other: "全 %d タグ" + + categories: + zero: カテゴリなし + one: "全 1 カテゴリ" + other: "全 %d カテゴリ" + + archive_posts: + zero: ポストなし + one: "全 1 ポスト" + other: "全 %d ポスト" + +state: + posts: ポスト + pages: ページ + tags: タグ + categories: カテゴリ + +cheers: + um: うーん + ok: OK + nice: まあまあ + good: いいね + great: すごい + excellent: 最高 + +keep_on: もっと書こう! + +symbol: + comma: ', ' + period: '. ' + colon: ':' diff --git a/themes/next/languages/ko.yml b/_data/languages/ko.yml similarity index 54% rename from themes/next/languages/ko.yml rename to _data/languages/ko.yml index bcda1d4e..2d38eb6c 100644 --- a/themes/next/languages/ko.yml +++ b/_data/languages/ko.yml @@ -1,9 +1,14 @@ ---- title: archive: 아카이브 category: 카테고리 tag: 태그 - schedule: Schedule + archives: 아카이브 + categories: 카테고리 + tags: 태그 + about: About + +author: 작성자 + menu: home: 홈 archives: 아카이브 @@ -11,63 +16,59 @@ menu: tags: 태그 about: About search: 검색 - schedule: Schedule - sitemap: Sitemap - commonweal: Commonweal 404 + sidebar: overview: 흝어보기 toc: 목차 + post: + sticky: 고정 posted: 작성일 - edited: Edited on - created: Post created modified: Updated at - edit: Edit this post in: In - more: more read_more: 더 읽어보기 untitled: 제목 없음 - sticky: 고정 toc_empty: 목차 없음 - views: Views - comments_count: 댓글 - related_posts: Related Posts - copy_button: 복사 - copy_success: Copied - copy_failure: Copy failed + visitors: 방문객 + wordcount: Words count in article + min2read: Reading time copyright: author: Post author link: Post link license_title: Copyright Notice - license_content: "All articles in this blog are licensed under %s unless stating additionally." + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + page: totally: 모두 tags: 태그 + footer: powered: "Powered by %s" theme: Theme - total_views: Total Views - total_visitors: Total Visitors + counter: tag_cloud: zero: 태그 없음 one: 1개의 태그 other: "총 %d개의 태그" + categories: zero: 카테고리 없음 one: 1개의 카테고리 other: "총 %d개의 카테고리" + archive_posts: zero: 포스트 없음 one: 1개의 포스트 other: "총 %d개의 포스트" + state: posts: 포스트 pages: 페이지 tags: 태그 categories: 카테고리 -search: - placeholder: Searching... + cheers: um: 음.. ok: OK @@ -75,24 +76,10 @@ cheers: good: 좋아요 great: 훌륭해요 excellent: 완벽해요 + keep_on: 포스트를 마저 작성하세요 + symbol: - comma: ", " - period: ". " - colon: ": " -reward: - donate: Donate - wechatpay: WeChat Pay - alipay: Alipay - bitcoin: Bitcoin -gitmentbutton: Show comments from Gitment -accessibility: - nav_toggle: Toggle navigation bar - prev_page: 이전 페이지 - next_page: 다음 페이지 -symbols_count_time: - count: Symbols count in article - count_total: Symbols count total - time: Reading time - time_total: Reading time total - time_minutes: mins. + comma: ', ' + period: '. ' + colon: ':' diff --git a/themes/next/languages/pt-BR.yml b/_data/languages/pt-BR.yml similarity index 53% rename from themes/next/languages/pt-BR.yml rename to _data/languages/pt-BR.yml index 721a15e2..28937629 100644 --- a/themes/next/languages/pt-BR.yml +++ b/_data/languages/pt-BR.yml @@ -1,9 +1,14 @@ ---- title: archive: Arquivo category: Categoria tag: Tag - schedule: Schedule + archives: Arquivos + categories: Categorias + tags: Tags + about: Sobre + +author: Autor + menu: home: Home archives: Arquivos @@ -11,63 +16,59 @@ menu: tags: Tags about: Sobre search: Pesquisar - schedule: Schedule - sitemap: Sitemap - commonweal: Commonweal 404 + sidebar: overview: Visão geral toc: Tabela de conteúdo + post: + sticky: Sticky posted: Postado em - edited: Edited on - created: Post created modified: Updated at - edit: Edit this post in: Em - more: more read_more: Leia mais untitled: Sem título - sticky: Sticky toc_empty: Este post não possui tabela de conteúdo - views: Views - comments_count: Comments - related_posts: Related Posts - copy_button: Copy - copy_success: Copied - copy_failure: Copy failed + visitors: Visitantes + wordcount: Words count in article + min2read: Reading time copyright: author: Post author link: Post link license_title: Copyright Notice - license_content: "All articles in this blog are licensed under %s unless stating additionally." + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + page: totally: Totalmente tags: tags + footer: powered: "Feito com %s" theme: Tema - total_views: Total Views - total_visitors: Total Visitors + counter: tag_cloud: zero: Sem tags one: 1 tag no total de other: "%d tags no total de" + categories: zero: Sem categoria one: 1 categoria no total de other: "%d categoria no total de" + archive_posts: zero: Sem posts. one: 1 post. other: "%d posts no total." + state: posts: Posts pages: Páginas tags: Tags categories: Categorias -search: - placeholder: Searching... + cheers: um: Uhmmmm... ok: OK @@ -75,24 +76,10 @@ cheers: good: Muito Bom great: Ótimo excellent: Excelente + keep_on: Continuar no post. + symbol: - comma: ", " - period: ". " - colon: ": " -reward: - donate: Donate - wechatpay: WeChat Pay - alipay: Alipay - bitcoin: Bitcoin -gitmentbutton: Show comments from Gitment -accessibility: - nav_toggle: Toggle navigation bar - prev_page: Página anterior - next_page: Próxima página -symbols_count_time: - count: Symbols count in article - count_total: Symbols count total - time: Reading time - time_total: Reading time total - time_minutes: mins. + comma: '. ' + period: ', ' + colon: ':' diff --git a/themes/next/languages/pt.yml b/_data/languages/pt.yml similarity index 54% rename from themes/next/languages/pt.yml rename to _data/languages/pt.yml index 3955f05d..2c359547 100644 --- a/themes/next/languages/pt.yml +++ b/_data/languages/pt.yml @@ -1,9 +1,14 @@ ---- title: archive: Arquivo category: Categoria tag: Tag - schedule: Schedule + archives: Arquivos + categories: Categorias + tags: Tags + about: Sobre + +author: Author + menu: home: Home archives: Arquivos @@ -11,63 +16,59 @@ menu: tags: Tags about: Sobre search: Pesquisa - schedule: Schedule - sitemap: Sitemap - commonweal: Commonweal 404 + sidebar: overview: Visão Geral toc: Tabela de Conteúdo + post: + sticky: Sticky posted: Postado em - edited: Edited on - created: Post created modified: Updated at - edit: Edit this post in: Em - more: more read_more: Ler mais untitled: Sem título - sticky: Sticky toc_empty: Esta publicação não possui uma tabela de conteúdo - views: Views - comments_count: Comments - related_posts: Related Posts - copy_button: Copy - copy_success: Copied - copy_failure: Copy failed + visitors: Visitors + wordcount: Words count in article + min2read: Reading time copyright: author: Post author link: Post link license_title: Copyright Notice - license_content: "All articles in this blog are licensed under %s unless stating additionally." + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + page: totally: Totalmente tags: tags + footer: powered: "Desenvolvido com amor com %s" theme: Tema - total_views: Total Views - total_visitors: Total Visitors + counter: tag_cloud: zero: Sem tags one: 1 tag no total other: "%d tags no total" + categories: zero: Sem categorias one: 1 categoria no total other: "%d categorias no total" + archive_posts: zero: Sem publicações. one: 1 post. other: "%d publicações no total." + state: posts: publicações pages: páginas tags: tags categories: categorias -search: - placeholder: Searching... + cheers: um: Um.. ok: OK @@ -75,24 +76,10 @@ cheers: good: Bom great: Grandioso excellent: Excelente + keep_on: Mantenha-se publicando! + symbol: - comma: ", " - period: ". " - colon: ": " -reward: - donate: Donate - wechatpay: WeChat Pay - alipay: Alipay - bitcoin: Bitcoin -gitmentbutton: Show comments from Gitment -accessibility: - nav_toggle: Toggle navigation bar - prev_page: Página anterior - next_page: Página seguinte -symbols_count_time: - count: Symbols count in article - count_total: Symbols count total - time: Reading time - time_total: Reading time total - time_minutes: mins. + comma: ', ' + period: '. ' + colon: ':' diff --git a/themes/next/languages/ru.yml b/_data/languages/ru.yml similarity index 52% rename from themes/next/languages/ru.yml rename to _data/languages/ru.yml index c7d8c798..bbb03987 100644 --- a/themes/next/languages/ru.yml +++ b/_data/languages/ru.yml @@ -1,9 +1,15 @@ ---- title: archive: Архив category: Категория tag: Тэг schedule: Календарь + archives: Архив + categories: Категории + tags: Тэги + about: О сайте + +author: Автор + menu: home: Главная archives: Архив @@ -13,61 +19,73 @@ menu: search: Поиск schedule: Календарь sitemap: Карта сайта - commonweal: Страница 404 + sidebar: overview: Обзор toc: Содержание + post: + created: Дата создания записи + modified: Дата обновления записи + sticky: Ссылка posted: Размещено - edited: Изменено - created: Создано - modified: Изменено - edit: Редактировать запись in: в категории - more: more + more: далее read_more: Читать полностью untitled: Без имени - sticky: Ссылка toc_empty: Эта запись без оглавления - views: Просмотров - comments_count: Комментариев - related_posts: Похожие записи - copy_button: Скопировать - copy_success: Скопировано! - copy_failure: Ошибка копирования! + visitors: Просмотров + wordcount: Кол-во слов в статье + min2read: Время чтения в минутах copyright: author: Автор записи link: Ссылка на запись license_title: Информация об авторских правах - license_content: "Все записи на этом сайте защищены лицензией %s, если не указано дополнительно." + license_content: 'Все записи на этом сайте защищены лицензией + %s если не указано дополнительно.' + page: totally: Всего tags: тэги + footer: - powered: "Генератор — %s" - theme: Тема - total_views: Всего просмотров - total_visitors: Всего посетителей + powered: "Powered by %s" + theme: Theme + counter: tag_cloud: zero: Нет тэгов. one: 1 тэг. + two: "%d тэга всего." + three: "%d тэга всего." + four: "%d тэга всего." other: "%d тэгов всего." + categories: zero: Нет категорий. one: 1 категория. + two: "%d категории всего." + three: "%d категории всего." + four: "%d категории всего." other: "%d категорий всего." + archive_posts: zero: Нет записей. one: 1 запись. + two: "%d записи всего." + three: "%d записи всего." + four: "%d записи всего." other: "%d записей всего." + state: posts: Архив pages: Страницы tags: Тэги categories: Категории + search: placeholder: Поиск... + cheers: um: Эм.. ok: OK @@ -75,24 +93,10 @@ cheers: good: Хорошо great: Замечательно excellent: Великолепно + keep_on: Продолжаю писать. + symbol: - comma: ", " - period: ". " - colon: ": " -reward: - donate: Донат - wechatpay: WeChat Pay - alipay: Alipay - bitcoin: Bitcoin -gitmentbutton: Открыть Gitment комментарии -accessibility: - nav_toggle: Показать/скрыть меню - prev_page: Предыдущая страница - next_page: Следующая страница -symbols_count_time: - count: Кол-во символов в статье - count_total: Общее кол-во символов - time: Время чтения - time_total: Общее время чтения - time_minutes: мин. + comma: ', ' + period: '. ' + colon: ':' diff --git a/themes/next/languages/zh-CN.yml b/_data/languages/zh-Hans.yml similarity index 55% rename from themes/next/languages/zh-CN.yml rename to _data/languages/zh-Hans.yml index d0c78f2e..3879a38b 100644 --- a/themes/next/languages/zh-CN.yml +++ b/_data/languages/zh-Hans.yml @@ -1,101 +1,93 @@ ---- title: archive: 归档 category: 分类 tag: 标签 schedule: 日程表 + archives: 归档 + categories: 分类 + tags: 标签 + about: 关于 + +author: 博主 + menu: home: 首页 archives: 归档 categories: 分类 - frontends: 前端 - backends: 后端 - tools: 工具 tags: 标签 about: 关于 search: 搜索 schedule: 日程表 sitemap: 站点地图 - commonweal: 公益 404 + commonweal: 公益404 + sidebar: overview: 站点概览 toc: 文章目录 + post: + created: 创建于 + modified: 更新于 + sticky: 置顶 posted: 发表于 - edited: 更新于 - created: 创建时间 - modified: 修改时间 - edit: 编辑 in: 分类于 - more: 更多 read_more: 阅读全文 untitled: 未命名 - sticky: 置顶 toc_empty: 此文章未包含目录 - views: 阅读次数 - comments_count: 评论数 - related_posts: 相关文章 - copy_button: 复制 - copy_success: 复制成功 - copy_failure: 复制失败 + visitors: 阅读次数 + wordcount: 字数统计 + min2read: 阅读时长 copyright: author: 本文作者 link: 本文链接 license_title: 版权声明 - license_content: "本博客所有文章除特别声明外,均采用 %s 许可协议。转载请注明出处!" + license_content: '本博客所有文章除特别声明外,均采用 + %s 许可协议。转载请注明出处!' + page: totally: 共有 tags: 标签 + footer: powered: "由 %s 强力驱动" theme: 主题 - total_views: 总访问量 - total_visitors: 总访客量 + counter: tag_cloud: zero: 暂无标签 one: 目前共计 1 个标签 other: "目前共计 %d 个标签" + categories: zero: 暂无分类 one: 目前共计 1 个分类 other: "目前共计 %d 个分类" + archive_posts: zero: 暂无日志。 one: 目前共计 1 篇日志。 other: "目前共计 %d 篇日志。" + state: posts: 日志 pages: 页面 tags: 标签 categories: 分类 + search: placeholder: 搜索... + cheers: um: 嗯.. - ok: 还行 - nice: 不错 + ok: OK + nice: 好 good: 很好 great: 非常好 excellent: 太棒了 + keep_on: 继续努力。 + symbol: - comma: "," - period: "。" - colon: ":" -reward: - donate: 打赏 - wechatpay: 微信支付 - alipay: 支付宝 - bitcoin: 比特币 -gitmentbutton: 显示 Gitment 评论 -accessibility: - nav_toggle: 切换导航栏 - prev_page: 上一页 - next_page: 下一页 -symbols_count_time: - count: 本文字数 - count_total: 站点总字数 - time: 阅读时长 - time_total: 站点阅读时长 - time_minutes: 分钟 + comma: ', ' + period: '。 ' + colon: ':' diff --git a/themes/next/languages/zh-hk.yml b/_data/languages/zh-hk.yml similarity index 52% rename from themes/next/languages/zh-hk.yml rename to _data/languages/zh-hk.yml index 0ef571eb..bb067939 100644 --- a/themes/next/languages/zh-hk.yml +++ b/_data/languages/zh-hk.yml @@ -1,9 +1,15 @@ ---- title: archive: 歸檔 category: 分類 tag: 標籤 schedule: 日程表 + archives: 歸檔 + categories: 分類 + tags: 標籤 + about: 關於 + +author: 博主 + menu: home: 首頁 archives: 歸檔 @@ -13,86 +19,75 @@ menu: search: 檢索 schedule: 日程表 sitemap: 站點地圖 - commonweal: 公益 404 + commonweal: 公益404 + sidebar: overview: 本站概覽 toc: 文章目錄 + post: + created: 創建於 + modified: 更新於 + sticky: 置頂 posted: 發表於 - edited: 更新於 - created: 創建時間 - modified: 修改時間 - edit: 編輯 in: 分類於 - more: 更多 read_more: 閱讀全文 untitled: 未命名 - sticky: 置頂 toc_empty: 此文章未包含目錄 - views: 閱讀次數 - comments_count: 評論數 - related_posts: 相關文章 - copy_button: 複製 - copy_success: 複製成功 - copy_failure: 複製失敗 + visitors: 閱讀次數 + wordcount: 字數統計 + min2read: 閱讀時長 copyright: - author: 博主 - link: 文章連結 - license_title: 版權聲明 - license_content: "本網誌所有文章除特別聲明外,均採用 %s 許可協議。轉載請註明出處!" + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + page: totally: 共有 tags: 標籤 + footer: powered: "由 %s 強力驅動" theme: 主題 - total_views: 總瀏覽次數 - total_visitors: 訪客總數 + counter: tag_cloud: zero: 暫無標籤 one: 目前共有 1 個標籤 other: "目前共有 %d 個標籤" + categories: zero: 暫無分類 one: 目前共有 1 個分類 other: "目前共有 %d 個分類" + archive_posts: zero: 暫無文章。 one: 目前共有 1 篇文章。 other: "目前共有 %d 篇文章。" + state: posts: 文章 pages: 頁面 tags: 標籤 categories: 分類 + search: placeholder: 搜索... + cheers: um: 嗯.. - ok: 還行 + ok: OK nice: 好 good: 很好 great: 非常好 - excellent: 太棒了 + excellent: 激爆好 + keep_on: 繼續努力。 + symbol: - comma: "," - period: "。" - colon: ":" -reward: - donate: 打賞 - wechatpay: 微信支付 - alipay: 支付寶 - bitcoin: 比特幣 -gitmentbutton: 顯示 Gitment 評論 -accessibility: - nav_toggle: 切換導航欄 - prev_page: 上一頁 - next_page: 下一頁 -symbols_count_time: - count: 本文字數 - count_total: 站點總字數 - time: 閱讀時長 - time_total: 站點閱讀時長 - time_minutes: 分鍾 + comma: ', ' + period: '。 ' + colon: ':' diff --git a/_data/languages/zh-tw.yml b/_data/languages/zh-tw.yml new file mode 100644 index 00000000..c79b3686 --- /dev/null +++ b/_data/languages/zh-tw.yml @@ -0,0 +1,93 @@ +title: + archive: 歸檔 + category: 分類 + tag: 標籤 + schedule: 日程表 + archives: 歸檔 + categories: 分類 + tags: 標籤 + about: 關於 + +author: 博主 + +menu: + home: 首頁 + archives: 歸檔 + categories: 分類 + tags: 標籤 + about: 關於 + search: 檢索 + schedule: 日程表 + sitemap: 站點地圖 + commonweal: 公益404 + +sidebar: + overview: 本站概覽 + toc: 文章目錄 + +post: + created: 創建於 + modified: 更新於 + sticky: 置頂 + posted: 發表於 + in: 分類於 + read_more: 閱讀全文 + untitled: 未命名 + toc_empty: 此文章未包含目錄 + visitors: 閱讀次數 + wordcount: 字數統計 + min2read: 閱讀時長 + copyright: + author: Post author + link: Post link + license_title: Copyright Notice + license_content: 'All articles in this blog are licensed under + %s unless stating additionally.' + +page: + totally: 共有 + tags: 標籤 + +footer: + powered: "由 %s 強力驅動" + theme: 主題 + +counter: + tag_cloud: + zero: 暫無標籤 + one: 目前共計 1 個標籤 + other: "目前共計 %d 個標籤" + + categories: + zero: 暫無分類 + one: 目前共計 1 個分類 + other: "目前共計 %d 個分類" + + archive_posts: + zero: 暫無文章。 + one: 目前共計 1 篇文章。 + other: "目前共計 %d 篇文章。" + +state: + posts: 文章 + pages: 頁面 + tags: 標籤 + categories: 分類 + +search: + placeholder: 搜索... + +cheers: + um: 嗯.. + ok: OK + nice: 好 + good: 很好 + great: 非常好 + excellent: 非常屌 + +keep_on: 繼續努力。 + +symbol: + comma: ', ' + period: '。 ' + colon: ':' diff --git a/_includes/_blocks/page_class.html b/_includes/_blocks/page_class.html new file mode 100644 index 00000000..f2a7e232 --- /dev/null +++ b/_includes/_blocks/page_class.html @@ -0,0 +1,12 @@ +{% case page.layout %} +{% when 'index' %} + {% capture page_class %}page-home{% endcapture %} +{% when 'post' %} + {% capture page_class %}page-post-detail{% endcapture %} +{% when 'page' %} + {% capture page_class %}page-post-detail{% endcapture %} +{% when 'archive' %} + {% capture page_class %}page-archive{% endcapture %} +{% when 'schedule' %} + {% capture page_class %}page-post-detail page-calendar{% endcapture %} +{% endcase %} diff --git a/_includes/_blocks/script_extra.html b/_includes/_blocks/script_extra.html new file mode 100644 index 00000000..4dbb0ef6 --- /dev/null +++ b/_includes/_blocks/script_extra.html @@ -0,0 +1,23 @@ +{% case page.layout %} +{% when 'post' %} + {% capture script_extra %}{% include _scripts/pages/post-details.html %}{% endcapture %} +{% when 'archive' %} + {% capture script_extra %} + {% if site.use_motion %} + + {% endif %} + {% include _scripts/pages/pagination.html %} + {% endcapture %} +{% when 'category' %} + {% capture script_extra %} + {% include _scripts/pages/pagination.html %} + {% endcapture %} +{% when 'tag' %} + {% capture script_extra %} + {% include _scripts/pages/pagination.html %} + {% endcapture %} +{% else %} + {% capture script_extra %}{% include _scripts/pages/post-details.html %}{% endcapture %} +{% endcase %} diff --git a/_includes/_blocks/sidebar.html b/_includes/_blocks/sidebar.html new file mode 100644 index 00000000..8c1600ed --- /dev/null +++ b/_includes/_blocks/sidebar.html @@ -0,0 +1,23 @@ +{% case page.layout %} +{% when 'index' %} + {% assign is_post = false %} + {% capture sidebar %}{% include _macro/sidebar.html %}{% endcapture %} +{% when 'post' %} + {% assign is_post = true %} + {% capture sidebar %}{% include _macro/sidebar.html %}{% endcapture %} +{% when 'page' %} + {% assign is_post = false %} + {% capture sidebar %}{% include _macro/sidebar.html %}{% endcapture %} +{% when 'archive' %} + {% assign is_post = false %} + {% capture sidebar %}{% include _macro/sidebar.html %}{% endcapture %} +{% when 'category' %} + {% assign is_post = false %} + {% capture sidebar %}{% include _macro/sidebar.html %}{% endcapture %} +{% when 'tag' %} + {% assign is_post = false %} + {% capture sidebar %}{% include _macro/sidebar.html %}{% endcapture %} +{% when 'schedule' %} + {% assign is_post = false %} + {% capture sidebar %}{% include _macro/sidebar.html %}{% endcapture %} +{% endcase %} diff --git a/_includes/_blocks/title.html b/_includes/_blocks/title.html new file mode 100644 index 00000000..f2aec268 --- /dev/null +++ b/_includes/_blocks/title.html @@ -0,0 +1,29 @@ +{% case page.layout %} +{% when 'index' %} + {% capture title %}{{ site.title }}{% if site.index_with_subtitle and site.subtitle %} - {{site.subtitle }}{% endif %}{% endcapture %} +{% when 'post' %} + {% capture title %}{{ page.title }} | {{ site.title }}{% endcapture %} +{% when 'page' %} + {% capture title %} + {% assign page_title_suffix = ' | ' | append: site.title %} + {% if page.type == "categories" and page.title == nil %} + {{ __.title.categories | append: page_title_suffix }} + {% elsif page.type == "tags" and page.title == nil %} + {{ __.title.tags | append: page_title_suffix }} + {% elsif page.type == "about" and page.title == nil %} + {{ __.title.about | append: page_title_suffix }} + {% else %} + {{ page.title | append: page_title_suffix }} + {% endif %} + {% endcapture %} +{% when 'archive' %} + {% capture title %}{{ __.title.archives }} | {{ site.title }}{% endcapture %} +{% when 'category' %} + {% capture title %}{{ __.title.category }} | {{ site.title }}{% endcapture %} +{% when 'tag' %} + {% capture title %}{{ __.title.tag }} | {{ site.title }}{% endcapture %} +{% when 'schedule' %} + {% capture title %}{{ __.title.schedule }} | {{ site.title }}{% endcapture %} +{% endcase %} + +{% assign title = title | strip_newlines %} diff --git a/themes/next/layout/_custom/header.swig b/_includes/_custom/header.html similarity index 100% rename from themes/next/layout/_custom/header.swig rename to _includes/_custom/header.html diff --git a/themes/next/layout/_custom/sidebar.swig b/_includes/_custom/sidebar.html similarity index 100% rename from themes/next/layout/_custom/sidebar.swig rename to _includes/_custom/sidebar.html diff --git a/_includes/_helper/_config_map.html b/_includes/_helper/_config_map.html new file mode 100644 index 00000000..2e71a5cc --- /dev/null +++ b/_includes/_helper/_config_map.html @@ -0,0 +1,23 @@ +{% comment %} _config_map(include.key, include.value, include.deep, include.key_prefix) {% endcomment %} +{% capture _config_map %} + {% if include.key != '' and include.key != nil and include.deep <= 3 %} + {% assign value_type = include.value | jsonify | slice: 0 %} + {% if value_type == '{' %} + {% for key_value in include.value %} + {% assign key = key_value[0] %} + {% assign value = key_value[1] %} + {% assign deep = include.deep | plus: 1 %} + {% capture key_prefix %}{{ include.key_prefix }}{{ include.key }}.{% endcapture %} + {% include _helper/_config_map.html key=key value=value deep=deep key_prefix=key_prefix %} + {{ _config_map }} + {% endfor %} + {% elsif value_type != '[' %} + {% assign value = include.value | jsonify %} + {% if value != '{}' and value != '[]' %} + '{{ include.key_prefix }}{{ include.key }}': {{ value }}, + {% endif %} + {% endif %} + {% endif %} +{% endcapture %} + +{% assign _config_map = _config_map | normalize_whitespace %} \ No newline at end of file diff --git a/_includes/_helper/_toc.html b/_includes/_helper/_toc.html new file mode 100644 index 00000000..41def9b8 --- /dev/null +++ b/_includes/_helper/_toc.html @@ -0,0 +1,45 @@ +{% comment %} _toc(class, list_number, include.source, include.level, include.number_prefix) {% endcomment %} +{% capture _toc %} + {% if include.level <= 6 %} + {% assign tag_begin = ''%} + {% assign tmp = block | split: tag_end %} + {% assign source = tmp[1] | strip %} + + {% assign tmp = tmp[0] | strip | split: '>' %} + {% assign toc_title = tmp | shift | join: '>' | strip_html %} + + {% assign tmp = tmp[0] | strip | split: 'id=' %} + {% assign id = tmp[1] | strip | replace: '"', '' %} + +
  • + + {% if list_number %} + {{ include.number_prefix }}{{ forloop.index }} + {% endif %} + {{ toc_title }} + + + {% capture number_prefix %}{{ include.number_prefix }}{{ forloop.index }}.{% endcapture %} + {% assign level = include.level | plus: 1 %} + {% include _helper/_toc.html source=source level=level number_prefix=number_prefix %} + {% if _toc.size != 0 %} +
      + {{ _toc }} +
    + {% endif %} +
  • + {% endfor %} + {% endif %} + {% endif %} +{% endcapture %} + +{% assign _toc = _toc | normalize_whitespace %} \ No newline at end of file diff --git a/_includes/_helper/config_map.html b/_includes/_helper/config_map.html new file mode 100644 index 00000000..2c750494 --- /dev/null +++ b/_includes/_helper/config_map.html @@ -0,0 +1,18 @@ +{% comment %} config_map() {% endcomment %} +{% capture config_map %} +( + {% assign exclude_keys = 'source, time, data, documents, github, related_posts, posts, pages, static_files, html_pages, html_files, collections, categories, tags, kramdown' | split: ', ' %} + {% assign keys = '' | split: '' %} + {% for site_key in site %} + {% unless exclude_keys contains site_key %} + {% assign keys = keys | push: site_key %} + {% assign key = site_key %} + {% assign value = site[site_key] %} + {% include _helper/_config_map.html key=key value=value deep=1 key_prefix='' %} + {{ _config_map }} + {% endunless %} + {% endfor %} +) +{% endcapture %} + +{% assign config_map = config_map | normalize_whitespace %} \ No newline at end of file diff --git a/_includes/_helper/lineno.html b/_includes/_helper/lineno.html new file mode 100644 index 00000000..34026842 --- /dev/null +++ b/_includes/_helper/lineno.html @@ -0,0 +1,29 @@ +{% comment %} lineno(source) {% endcomment %} +{% assign block_begin = '
    ' %}
    +{% assign block_end = '
    ' %} + +{% comment %} This tag isn't in the site which is built locally. I don't know why? {% endcomment %} +{% assign div_tag_begin = '' %} +{% assign div_tag_end = '' %} +{% unless source contains '
    ' %} + {% assign div_tag_begin = '
    ' %} + {% assign div_tag_end = '
    ' %} +{% endunless %} + +{% assign blocks = source | split: block_begin | shift %} +{% for block in blocks %} + {% assign code_content = block | split: block_end | first | prepend: block_begin | append: block_end %} + {% assign line_count = code_content | newline_to_br | split: '
    ' | size | minus: 1 %} + {% assign lineno = '' %} + {% for no in (1..line_count) %} + {% if no == 1 %} + {% assign lineno = '1' %} + {% else %} + {% assign lineno = lineno | append: '
    ' | append: no %} + {% endif %} + {% endfor %} + {% capture code_content_with_lineno %}{{ div_tag_begin }}
    {{ lineno }}
    {{ code_content }}
    {{ div_tag_end }}{% endcapture %} + {% assign source = source | replace: code_content, code_content_with_lineno %} +{% endfor %} + +{% assign lineno = source %} \ No newline at end of file diff --git a/_includes/_helper/list_categories.html b/_includes/_helper/list_categories.html new file mode 100644 index 00000000..ce35af7f --- /dev/null +++ b/_includes/_helper/list_categories.html @@ -0,0 +1,14 @@ +{% comment %} list_categories(paginator, prev_text, next_text) {% endcomment %} +{% capture list_categories %} +
      + {% for cat_posts in site.categories %} +
    • + {% assign cat = cat_posts[0] %} + {% assign posts = cat_posts[1] %} + {% assign cat_url_encode = cat | url_encode | replace: '+', '%20' %} + {{ cat }} + {{ posts.size }} + + {% endfor %} +
    +{% endcapture %} diff --git a/_includes/_helper/open_graph.html b/_includes/_helper/open_graph.html new file mode 100644 index 00000000..ef31228f --- /dev/null +++ b/_includes/_helper/open_graph.html @@ -0,0 +1,125 @@ +{% comment %} open_graph(twitter_id, google_plus, fb_admins, fb_app_id) {% endcomment %} +{% capture open_graph %} + {% assign default_images = '' | split: '' %} + {% assign images = page.photos | default: default_images %} + {% assign page_content = page.content %} + {% assign description = page.description | default: page.excerpt | default: page_content | default: site.description %} + + {% if page.tags and page.tags.size != 0 %}{% assign page_tags = page.tags | join: ', ' %}{% endif %} + {% assign keywords = page.keywords | default: page_tags | default: site.keywords %} + + {% if page.layout == 'post' %} + {% assign type = 'article' %} + {% else %} + {% assign type = 'website' %} + {% endif %} + + {% assign url = page.url | absolute_url %} + {% assign og_title = page.title | default: site.title %} + {% assign site_name = site.title %} + {% assign language = page.language | default: site.language %} + {% assign updated = page.updated %} + {% assign twitter_card = 'summary' %} + + {% if description %} + {% assign description = description | strip_html | strip | + replace: '<', '<' | + replace: '>', '>' | + replace: '&', '&' | + replace: '"', '"' | + replace: "'", ''' | + replace: '\n', ' ' %} + {% endif %} + + {% if images.size == 0 and page_content %} + {% assign imgs = page_content | strip | split: ' + + {% endif %} + + {% if keywords %} + + + {% endif %} + + + + + + + {% if description %} + + + {% endif %} + + {% if language %} + + + {% endif %} + + {% for image in images %} + + + {% endfor %} + + {% if updated %} + + + {% endif %} + + + + + {% if description %} + + + {% endif %} + + {% if images.size != 0 %} + + + {% endif %} + + {% if twitter_id %} + {% if twitter_id[0] != '@' %} + {% assign twitter_id = '@' | append: twitter_id %} + {% endif %} + + + {% endif %} + + {% if twitter_site %} + + + {% endif %} + + {% if google_plus %} + + + {% endif %} + + {% if fb_admins %} + + + {% endif %} + + {% if fb_app_id %} + + + {% endif %} + +{% endcapture %} +{% assign lines = open_graph | normalize_whitespace | split: '' %} +{% capture open_graph %}{% for line in lines %} +{{ line | strip }}{% endfor %}{% endcapture %} diff --git a/_includes/_helper/paginator.html b/_includes/_helper/paginator.html new file mode 100644 index 00000000..6baf185b --- /dev/null +++ b/_includes/_helper/paginator.html @@ -0,0 +1,72 @@ +{% comment %} paginator(paginator, prev_text, next_text) {% endcomment %} +{% capture paginator %} + {% assign end_size = 1 %} + {% assign mid_size = 1 %} + {% assign current = paginator.page %} + {% capture current_page %} + {{ current }} + {% endcapture %} + {% if paginator.previous_page %} + + {% endif %} + + {% assign total = paginator.total_pages %} + + {% assign left_end = end_size %} + {% assign right_end = total | minus: end_size | plus: 1 %} + {% assign left_mid = current | minus: mid_size %} + {% assign right_mid = current | plus: mid_size %} + + {% if left_end >= current %}{% assign left_end = current | minus: 1 %}{% endif %} + + {% assign current_plus_one = current | plus: 1 %} + {% if right_end <= current_plus_one %}{% assign right_end = current_plus_one %}{% endif %} + + {% if left_mid <= end_size %}{% assign left_mid = left_mid | plus: end_size %}{% endif %} + + {% assign total_minus_end_size = total | minus: end_size %} + {% if right_mid > total_minus_end_size %}{% assign right_mid = right_mid | minus: end_size %}{% endif %} + + {% assign space_html = '' %} + + {% for i in (1..left_end) %} + {% assign href = site.paginate_path | relative_url | replace: '//', '/' | replace: ':num', i %} + {% if i == 1 %} + {% assign href = "/" | relative_url %} + {% endif %} + {{ i }} + {% endfor %} + + {% assign current_minus_end_size_minus_mid_size = current | minus: end_size | minus: mid_size %} + {% if current_minus_end_size_minus_mid_size > 1 %} + {{ space_html }} + {% endif %} + + {% assign current_minus_one = current | minus: 1 %} + {% if left_mid > left_end %} + {% for i in (left_mid..current_minus_one) %} + {{ i }} + {% endfor %} + {% endif %} + {{ current_page }} + + {% if right_mid < right_end %} + {% for i in (current_plus_one..right_mid) %} + {{ i }} + {% endfor %} + {% endif %} + + {% assign total_minus_end_size_minus_mid_size = total_minus_end_size | minus: mid_size %} + {% if total_minus_end_size_minus_mid_size > current %} + {{ space_html }} + {% endif %} + + {% for i in (right_end..total) %} + {{ i }} + {% endfor %} + + {% if current < total %} + + {% endif %} +{% endcapture %} +{% assign paginator = paginator | normalize_whitespace %} diff --git a/_includes/_helper/tagcloud.html b/_includes/_helper/tagcloud.html new file mode 100644 index 00000000..ab5ae20a --- /dev/null +++ b/_includes/_helper/tagcloud.html @@ -0,0 +1,58 @@ +{% comment %} tagcloud(min_font, max_font, amount, color, start_color, end_color) {% endcomment %} +{% capture tagcloud %} + {% assign tags = site.tags %} + {% assign max = max_font %} + {% assign min = min_font %} + {% assign sizes = '' | split: '' %} + {% assign unit = 'px' %} + {% assign start_color = start_color | split: ',' %} + {% assign end_color = end_color | split: ',' %} + + {% for tag in tags %} + {% if forloop.index > amount %} + {% break %} + {% endif %} + {% assign sizes = sizes | push: tag[1].size %} + {% endfor %} + + {% assign sizes = sizes | uniq | sort %} + {% assign length = sizes.size | minus: 1 %} + + {% for tag in tags %} + {% if forloop.index > amount %} + {% break %} + {% endif %} + + {% assign ratio = 0 %} + + {% if length > 0 %} + {% for size in sizes %} + {% if size == tag[1].size %} + {% assign ratio = forloop.index0 | times: 1.0 | divided_by: length %} + {% break %} + {% endif %} + {% endfor %} + {% endif %} + + {% assign tmp = max | minus: min | times: ratio %} + {% assign size = tmp | plus: min %} + {% assign tmp = size | round: 2 %} + + {% assign style = 'font-size: ' | append: tmp | append: unit | append: ';' %} + + {% if color %} + {% assign mid_color = '' | split: '' %} + {% for i in (0..2) %} + {% assign tmp = end_color[i] | minus: start_color[i] | times: ratio %} + {% assign tmp = start_color[i] | plus: tmp | round %} + {% assign mid_color = mid_color | push: tmp %} + {% endfor %} + {% assign mid_color = 'rgb(' | append: mid_color[0] | append: ',' | append: mid_color[1] | append: ',' | append: mid_color[2] | append: ')' %} + {% assign style = style | append: 'color: ' | append: mid_color %} + {% endif %} + {% assign tag_url_encode = tag[0] | url_encode | replace: '+', '%20' %} + {{ tag[0] }} + {% endfor %} + +{% endcapture %} +{% assign tagcloud = tagcloud | normalize_whitespace %} diff --git a/_includes/_helper/toc.html b/_includes/_helper/toc.html new file mode 100644 index 00000000..31079bf8 --- /dev/null +++ b/_includes/_helper/toc.html @@ -0,0 +1,10 @@ +{% comment %} toc(source, class, list_number) {% endcomment %} +{% include _helper/_toc.html source=source level=1 number_prefix='' %} +{% assign toc = _toc | normalize_whitespace %} +{% if toc.size != 0 %} + {% capture toc %} +
      + {{ toc }} +
    + {% endcapture %} +{% endif %} diff --git a/_includes/_helper/wordcount.html b/_includes/_helper/wordcount.html new file mode 100644 index 00000000..4b62f598 --- /dev/null +++ b/_includes/_helper/wordcount.html @@ -0,0 +1,28 @@ +{% comment %} wordcount(source) {% endcomment %} +{% assign source = source | strip_html | strip_newlines %} +{% assign no_english_source = source | upcase %} +{% assign no_english_source = no_english_source | remove: 'A' | remove: 'B' | remove: 'C' %} +{% assign no_english_source = no_english_source | remove: 'D' | remove: 'E' | remove: 'F' %} +{% assign no_english_source = no_english_source | remove: 'G' | remove: 'H' | remove: 'I' %} +{% assign no_english_source = no_english_source | remove: 'J' | remove: 'K' | remove: 'L' %} +{% assign no_english_source = no_english_source | remove: 'M' | remove: 'N' | remove: 'O' %} +{% assign no_english_source = no_english_source | remove: 'P' | remove: 'Q' | remove: 'R' %} +{% assign no_english_source = no_english_source | remove: 'S' | remove: 'T' | remove: 'U' %} +{% assign no_english_source = no_english_source | remove: 'V' | remove: 'W' | remove: 'X' %} +{% assign no_english_source = no_english_source | remove: 'Y' | remove: 'Z' %} + +{% assign no_english_source = no_english_source | remove: ' ' | remove: '"' | remove: '.' | remove: ',' %} +{% assign no_english_source = no_english_source | remove: '?' | remove: ':' | remove: ';' | remove: "'" %} +{% assign no_english_source = no_english_source | remove: '<' | remove: '>' | remove: '[' | remove: '']' %} +{% assign no_english_source = no_english_source | remove: '{' | remove: '}' | remove: '\' | remove: '/' %} +{% assign no_english_source = no_english_source | remove: '(' | remove: ')' | remove: '!' | remove: '-' %} + +{% assign no_english_source = no_english_source | remove: '。' | remove: ',' | remove: '?' | remove: '…' %} +{% assign no_english_source = no_english_source | remove: '“' | remove: '”' | remove: '《' | remove: '》' %} +{% assign no_english_source = no_english_source | remove: '【' | remove: '】' | remove: '‘' | remove: '’' %} +{% assign no_english_source = no_english_source | remove: ':' | remove: ';' | remove: '「' | remove: '」' %} +{% assign no_english_source = no_english_source | remove: '!' | remove: '—' | remove: '、' | remove: '·' %} + +{% assign no_english_wordcount = no_english_source | size %} +{% assign english_wordcount = source | number_of_words %} +{% assign wordcount = no_english_wordcount | plus: english_wordcount %} diff --git a/_includes/_layout.html b/_includes/_layout.html new file mode 100644 index 00000000..fdb739e0 --- /dev/null +++ b/_includes/_layout.html @@ -0,0 +1,86 @@ + +{% include _blocks/title.html %} +{% include _blocks/page_class.html %} +{% include _blocks/sidebar.html %} +{% include _blocks/script_extra.html %} + +{% assign html_class = 'theme-next ' | append: site.scheme %} +{% if site.use_motion %} + {% assign html_class = html_class | append: ' use-motion' %} +{% endif %} + + + + {% include _partials/head.html %} + {{ title }} + {% include _third-party/analytics/index.html %} + + + + + {% assign container_class = "container " %} + {% if site.sidebar.position %} + {% assign container_class = container_class | append: 'sidebar-position-' | append: site.sidebar.position %} + {% endif %} + +
    +
    + + + +
    +
    +
    +
    + {{ content }} +
    + {% include _third-party/duoshuo-hot-articles.html %} + {% include _partials/comments.html %} +
    + {% if site.sidebar.display != 'remove' %} + {{ sidebar }} + {% endif %} +
    +
    + +
    + +
    + + {% unless site.sidebar.b2t %} +
    + + {% if site.sidebar.scrollpercent %} + 0% + {% endif %} +
    + {% endunless %} + +
    + + {% include _scripts/vendors.html %} + {% include _scripts/commons.html %} + + {% assign scheme_script = '_scripts/schemes/' | append: site.scheme | downcase | append: '.html' %} + {% include {{ scheme_script }} %} + + {{ script_extra }} + + {% include _scripts/boostrap.html %} + + {% include _third-party/comments/index.html %} + {% include _third-party/search/index.html %} + {% include _third-party/analytics/lean-analytics.html %} + {% include _third-party/seo/baidu-push.html %} + {% include _third-party/rating.html %} + {% include _third-party/mathjax.html %} + {% include _third-party/scroll-cookie.html %} + {% include _third-party/exturl.html %} + + diff --git a/_includes/_macro/post-collapse.html b/_includes/_macro/post-collapse.html new file mode 100644 index 00000000..388157d4 --- /dev/null +++ b/_includes/_macro/post-collapse.html @@ -0,0 +1,31 @@ +{% comment %} post-collapse(post) {% endcomment %} + diff --git a/_includes/_macro/post-content.html b/_includes/_macro/post-content.html new file mode 100644 index 00000000..1ebdce80 --- /dev/null +++ b/_includes/_macro/post-content.html @@ -0,0 +1,7 @@ +{% if site.highlight.line_number %} + {% assign source = post.content %} + {% include _helper/lineno.html %} + {{ lineno }} +{% else %} + {{ post.content }} +{% endif %} \ No newline at end of file diff --git a/_includes/_macro/post-copyright.html b/_includes/_macro/post-copyright.html new file mode 100644 index 00000000..3b64d301 --- /dev/null +++ b/_includes/_macro/post-copyright.html @@ -0,0 +1,16 @@ +{% if site.post_copyright.enable %} +
      +
    • + {{ __.post.copyright.author | append: __.symbol.colon }} + {{ site.author }} +
    • +
    • + {{ __.post.copyright.link | append: __.symbol.colon }} + {{ post.url | absolute_url }} +
    • +
    • + {{ __.post.copyright.license_title | append: __.symbol.colon }} + {{ __.post.copyright.license_content | replace_first: '%s', site.post_copyright.license_url | replace_first: '%s', site.post_copyright.license }} +
    • +
    +{% endif %} diff --git a/_includes/_macro/post-excerpt.html b/_includes/_macro/post-excerpt.html new file mode 100644 index 00000000..c89eb570 --- /dev/null +++ b/_includes/_macro/post-excerpt.html @@ -0,0 +1,7 @@ +{% if site.highlight.line_number %} + {% assign source = post.excerpt %} + {% include _helper/lineno.html %} + {{ lineno }} +{% else %} + {{ post.excerpt }} +{% endif %} \ No newline at end of file diff --git a/_includes/_macro/post.html b/_includes/_macro/post.html new file mode 100644 index 00000000..0036aabf --- /dev/null +++ b/_includes/_macro/post.html @@ -0,0 +1,431 @@ +{% comment %} post(post, is_index, post_extra_class) {% endcomment %} + + {% if 'quote, picture' contains post.type %} + {% assign headlessPost = true %} + {% endif %} + + {% assign post_class = 'post post-type-' | append: post.type | default: 'normal' %} + {% assign post_class = post_class | append: ' ' | append: post_extra_class | default: '' %} + {% if post.sticky > 0 %} + {% assign post_class = post_class | append: ' ' | append: 'post-sticky' %} + {% endif %} + +
    + + + + + + + {% unless headlessPost %} +
    + + {% comment %} % Not to show title for quote posts that do not have a title {% endcomment %} + {% unless is_index and post.type == 'quote' and post.title == nil %} + <{% if site.seo %}h2{% else %}h1{% endif %} class="post-title" itemprop="name headline"> + {% comment %} Link posts {% endcomment %} + {% if post.link %} + {% if post.sticky > 0 %} + {{ post.sticky }} + + + + {% endif %} + + {% else %} + {% if is_index %} + {% if post.sticky > 0 %} + + + + {% endif %} + + {% else %}{{ post.title }}{% endif %} + {% endif %} + + {% endunless %} + + +
    + {% endunless %} + +
    + + {% comment %} Gallery support {% endcomment %} + {% if post.photos and post.photos.size > 0 %} +
    + {% assign COLUMN_NUMBER = 3 %} + {% for photo in post.photos %} + {% assign index0_modulo_COLUMN_NUMBER = forloop.index0 | modulo: COLUMN_NUMBER %} + {% if index0_modulo_COLUMN_NUMBER == 0 %}
    {% endif %} + + {% if index0_modulo_COLUMN_NUMBER == 2 %}
    {% endif %} + {% endfor %} + + {% comment %} Append end tag for `post-gallery-row` when (photos size mod COLUMN_NUMBER) is less than COLUMN_NUMBER {% endcomment %} + {% assign photos_size_modulo_COLUMN_NUMBER = post.photos.size | modulo: COLUMN_NUMBER %} + {% if photos_size_modulo_COLUMN_NUMBER > 0 %}
    {% endif %} +
    + {% endif %} + + {% if is_index %} + {% if post.description and site.excerpt_description %} + {{ post.description }} + +
    + + {{ __.post.read_more }} » + +
    + + {% elsif post.excerpt %} + {% include _macro/post-excerpt.html %} + +
    + + {{ __.post.read_more }} » + +
    + + {% elsif site.auto_excerpt.enable %} + {% assign content = post.content | strip_html %} + {{ content | slice: 0, site.auto_excerpt.length }} + {% if content.size > site.auto_excerpt.length %}...{% endif %} + +
    + + {{ __.post.read_more }} » + +
    + + {% else %} + {% if post.type == 'picture' %} + {{ post.content }} + {% else %} + {% include _macro/post-content.html %} + {% endif %} + {% endif %} + {% else %} + {% include _macro/post-content.html %} + {% endif %} +
    + +
    + {% unless is_index %} + {% include _macro/wechat-subscriber.html %} + {% endunless %} +
    + +
    + {% unless is_index %} + {% include _macro/reward.html %} + {% endunless %} +
    + +
    + {% unless is_index %} + {% include _macro/post-copyright.html %} + {% endunless %} +
    + +
    + {% if post.tags and post.tags.size != 0 and is_index == nil or is_index == false %} + + {% endif %} + + {% unless is_index %} + {% if site.vkontakte_api.enable and site.vkontakte_api.like %} + {% assign vkontakte_api = true %} + {% endif %} + {% if site.facebook_sdk.enable and site.facebook_sdk.like_button %} + {% assign facebook_sdk = true %} + {% endif %} + {% if site.rating.enable or vkontakte_api or facebook_sdk %} +
    + {% if site.rating.enable %} +
    +
    +
    + {% endif %} + + {% if vkontakte_api or facebook_sdk %} + + {% endif %} +
    + {% endif %} + {% endunless %} + + {% unless is_index %} + {% if post.previous or post.next %} +
    +
    + {% if post.next %} + + {% endif %} +
    + + + +
    + {% if post.previous %} + + {% endif %} +
    +
    + {% endif %} + {% endunless %} + + {% if is_index %} + {% assign per_page = paginator.per_page | default: site.posts.size %} + {% assign index_modulo_per_page = forloop.index | modulo: per_page %} + {% if index_modulo_per_page == 0 %} + {% assign isLast = true %} + {% endif %} + {% unless isLast %} +
    + {% endunless %} + {% endif %} +
    + diff --git a/_includes/_macro/reward.html b/_includes/_macro/reward.html new file mode 100644 index 00000000..76f4f5a2 --- /dev/null +++ b/_includes/_macro/reward.html @@ -0,0 +1,22 @@ +{% if site.alipay or site.wechatpay %} +
    +
    {{ site.reward_comment }}
    + + +
    +{% endif %} diff --git a/_includes/_macro/sidebar.html b/_includes/_macro/sidebar.html new file mode 100644 index 00000000..6dfa5904 --- /dev/null +++ b/_includes/_macro/sidebar.html @@ -0,0 +1,179 @@ +{% comment %} sidebar(is_post) {% endcomment %} + + + + diff --git a/_includes/_macro/wechat-subscriber.html b/_includes/_macro/wechat-subscriber.html new file mode 100644 index 00000000..1bf2b2f5 --- /dev/null +++ b/_includes/_macro/wechat-subscriber.html @@ -0,0 +1,6 @@ +{% if site.wechat_subscriber.enabled %} +
    + {{ site.author }} wechat +
    {{ site.wechat_subscriber.description }}
    +
    +{% endif %} diff --git a/_includes/_partials/comments.html b/_includes/_partials/comments.html new file mode 100644 index 00000000..939ff0f2 --- /dev/null +++ b/_includes/_partials/comments.html @@ -0,0 +1,39 @@ +{% if page.comments %} +
    + {% if site.duoshuo and site.duoshuo.shortname or site.duoshuo_shortname %} +
    +
    + {% elsif site.facebook_sdk.enable and site.facebook_comments_plugin.enable %} +
    +
    + {% elsif site.vkontakte_api.enable and site.vkontakte_api.comments %} +
    + {% elsif site.disqus.enable %} +
    + +
    + {% elsif site.hypercomments_id %} +
    + {% elsif site.gentie_productKey %} +
    + {% elsif site.gitalk.enable %} +
    + {% elsif site.youyan_uid %} +
    + {% elsif site.livere_uid %} +
    + {% elsif site.changyan.appid and site.changyan.appkey %} +
    + {% elsif site.wildfire.enable %} +
    + {% endif %} +
    +{% endif %} diff --git a/_includes/_partials/footer.html b/_includes/_partials/footer.html new file mode 100644 index 00000000..d9e4af22 --- /dev/null +++ b/_includes/_partials/footer.html @@ -0,0 +1,23 @@ + + +{% if site.copyright %} +
    + {{ __.footer.powered | replace: '%s', 'Jekyll') }} +
    + +
    + {{ __.footer.theme }} - + + NexT.{{ site.scheme }} + +
    +{% endif %} diff --git a/_includes/_partials/head.html b/_includes/_partials/head.html new file mode 100644 index 00000000..70de6fb7 --- /dev/null +++ b/_includes/_partials/head.html @@ -0,0 +1,135 @@ + + + + + +{% if site.pace %} + {% assign pace_css_uri = site.vendors._internal | append: '/pace/'| append: site.pace_theme | append: '.min.css?v=1.0.2' | relative_url %} + {% assign pace_js_uri = site.vendors._internal | append: '/pace/pace.min.js?v=1.0.2' | relative_url %} + {% if site.vendors.pace %} + {% assign pace_js_uri = site.vendors.pace %} + {% endif %} + {% if site.vendors.pace_css %} + {% assign pace_css_uri = site.vendors.pace_css %} + {% endif %} + + +{% endif %} + + +{% if site.han %} + {% assign Han_uri = site.vendors._internal | append: '/Han/dist/han.min.css?v=3.3' | relative_url %} + {% if site.vendors.Han %} + {% assign Han_uri = site.vendors.Han %} + {% endif %} + +{% endif %} + + +{% comment %} #238, Disable Baidu tranformation {% endcomment %} + + + + +{% if site.google_site_verification %} + +{% endif %} + + +{% if site.yandex_site_verification %} + +{% endif %} + + +{% if site.baidu_site_verification %} + +{% endif %} + + +{% if site.qihu_site_verification %} + +{% endif %} + + +{% if site.fancybox %} + {% assign fancybox_css_uri = site.vendors._internal | append: '/fancybox/source/jquery.fancybox.css?v=2.1.5' | relative_url %} + {% if site.vendors.fancybox_css %} + {% assign fancybox_css_uri = site.vendors.fancybox_css %} + {% endif %} + +{% endif %} + +{% include _partials/head/external-fonts.html %} + +{% assign font_awesome_uri = site.vendors._internal | append: '/font-awesome/css/font-awesome.min.css?v=4.6.2' | relative_url %} +{% if site.vendors.fontawesome %} + {% assign font_awesome_uri = site.vendors.fontawesome %} +{% endif %} + + + + +{% if page.keywords %} + +{% elsif page.tags and page.tags | size != 0 %} + +{% elsif site.keywords %} + +{% endif %} + +{% assign site_rss = site.rss %} +{% if site.feed and site.feed.path and site.rss == '' or site.rss == nil %} + {% assign site_rss = site.feed.path %} +{% endif %} +{% if site_rss %} + +{% endif %} + + +{% if site.favicon %} + +{% endif %} + + +{% if site.facebook_sdk.enable and site.facebook_sdk.webmaster %} + + +{% endif %} + + +{% assign twitter_id = site.twitter %} +{% assign google_plus = site.google_plus %} +{% assign fb_admins = site.fb_admins %} +{% assign fb_app_id = site.fb_app_id %} +{% include _helper/open_graph.html %} +{{ open_graph }} + +{% comment %} Export some HEXO Configurations to Front-End {% endcomment %} + + +{% comment %} Canonical, good for google search engine (SEO) : https://support.google.com/webmasters/answer/139066 {% endcomment %} +{% if site.canonical %} + +{% endif %} + +{% include _partials/head/custom-head.html %} diff --git a/_includes/_partials/head/custom-head.html b/_includes/_partials/head/custom-head.html new file mode 100644 index 00000000..ce990b74 --- /dev/null +++ b/_includes/_partials/head/custom-head.html @@ -0,0 +1,3 @@ +{% comment %} +Custom head. +{% endcomment %} diff --git a/_includes/_partials/head/external-fonts.html b/_includes/_partials/head/external-fonts.html new file mode 100644 index 00000000..d065853b --- /dev/null +++ b/_includes/_partials/head/external-fonts.html @@ -0,0 +1,51 @@ +{% if site.font.enable %} + + {% assign font_config = site.font %} + {% assign font_families = '' %} + {% assign font_styles = ':300,300italic,400,400italic,700,700italic' %} + {% assign font_found = false %} + + {% if font_config.global.family and font_config.global.external %} + {% assign font_families = font_families | append: font_config.global.family | append: font_styles %} + {% assign font_found = true %} + {% endif %} + + {% if font_config.headings.family and font_config.headings.external %} + {% if font_found %} + {% assign font_families = font_families | append: '|' %} + {% endif %} + + {% assign font_families = font_families | append: font_config.headings.family | append: font_styles %} + {% endif %} + + {% if font_config.posts.family and font_config.posts.external %} + {% if font_found %} + {% assign font_families = font_families | append: '|' %} + {% endif %} + + {% assign font_families = font_families | append: font_config.posts.family | append: font_styles %} + {% endif %} + + {% if font_config.logo.family and font_config.logo.external %} + {% if font_found %} + {% assign font_families = font_families | append: '|' %} + {% endif %} + + {% assign font_families = font_families | append: font_config.logo.family | append: font_styles %} + {% endif %} + + {% if font_config.codes.family and font_config.codes.external %} + {% if font_found %} + {% assign font_families = font_families | append: '|' %} + {% endif %} + + {% assign font_families = font_families | append: font_config.codes.family | append: font_styles %} + {% endif %} + + {% if font_families != '' %} + {% assign font_families = font_families | append: '&subset=latin,latin-ext' %} + {% assign font_host = font_config.host | default: '//fonts.googleapis.com' %} + + {% endif %} + +{% endif %} diff --git a/_includes/_partials/header.html b/_includes/_partials/header.html new file mode 100644 index 00000000..3fb2a849 --- /dev/null +++ b/_includes/_partials/header.html @@ -0,0 +1,80 @@ +
    +
    + {% if site.custom_logo.image and site.scheme == 'Muse' %} +
    + + {{ site.title }} + +
    + {% endif %} + + + {% if site.seo %} +

    {{ site.subtitle }}

    + {% else %} +

    {{ site.subtitle }}

    + {% endif %} +
    + + +
    + + + +{% include _custom/header.html %} diff --git a/_includes/_partials/page-header.html b/_includes/_partials/page-header.html new file mode 100644 index 00000000..c12323bf --- /dev/null +++ b/_includes/_partials/page-header.html @@ -0,0 +1,26 @@ +
    +{% case page.layout %} +{% when 'page' %} + {% capture post_title %} + {% if page.type == "categories" and page.title == nil %} + {{ __.title.categories }} + {% elsif page.type == "tags" and page.title == nil %} + {{ __.title.tags }} + {% elsif page.type == "about" and page.title == nil %} + {{ __.title.about }} + {% else %} + {{ page.title }} + {% endif %} + {% endcapture %} +{% when 'schedule' %} + {% capture post_title %}{{ __.title.schedule }}{% endcapture %} +{% endcase %} + <{% if site.seo %}h2{% else %}h1{% endif %} class="post-title" itemprop="name headline">{{ post_title }} + +{% if page.description %} + +{% endif %} + +
    diff --git a/_includes/_partials/pagination.html b/_includes/_partials/pagination.html new file mode 100644 index 00000000..c00f33a4 --- /dev/null +++ b/_includes/_partials/pagination.html @@ -0,0 +1,8 @@ +{% if paginator.previous_page or paginator.next_page %} + +{% endif %} diff --git a/_includes/_partials/search.html b/_includes/_partials/search.html new file mode 100644 index 00000000..076fe0b2 --- /dev/null +++ b/_includes/_partials/search.html @@ -0,0 +1,9 @@ +{% if site.algolia_search.enable %} + {% include _third-party/search/algolia-search/dom.html %} +{% elsif site.swiftype_key %} + {% include _partials/search/swiftype.html %} +{% elsif site.tinysou_Key %} + {% include _partials/search/tinysou.html %} +{% elsif site.local_search.enable %} + {% include _partials/search/localsearch.html %} +{% endif %} diff --git a/themes/next/layout/_partials/search/localsearch.swig b/_includes/_partials/search/localsearch.html similarity index 85% rename from themes/next/layout/_partials/search/localsearch.swig rename to _includes/_partials/search/localsearch.html index f106aa06..1c7d9034 100644 --- a/themes/next/layout/_partials/search/localsearch.swig +++ b/_includes/_partials/search/localsearch.html @@ -8,7 +8,7 @@
    diff --git a/themes/next/layout/_partials/search/swiftype.swig b/_includes/_partials/search/swiftype.html similarity index 78% rename from themes/next/layout/_partials/search/swiftype.swig rename to _includes/_partials/search/swiftype.html index 6216e62c..f1b71cce 100644 --- a/themes/next/layout/_partials/search/swiftype.swig +++ b/_includes/_partials/search/swiftype.html @@ -1,12 +1,12 @@
    - +
    - diff --git a/_includes/_partials/search/tinysou.html b/_includes/_partials/search/tinysou.html new file mode 100644 index 00000000..2dfa3e31 --- /dev/null +++ b/_includes/_partials/search/tinysou.html @@ -0,0 +1,3 @@ +
    + +
    diff --git a/_includes/_partials/share/add-this.html b/_includes/_partials/share/add-this.html new file mode 100644 index 00000000..f5a6f225 --- /dev/null +++ b/_includes/_partials/share/add-this.html @@ -0,0 +1,4 @@ + +
    + +
    diff --git a/themes/next/layout/_partials/share/baidushare.swig b/_includes/_partials/share/baidushare.html similarity index 95% rename from themes/next/layout/_partials/share/baidushare.swig rename to _includes/_partials/share/baidushare.html index d30f6a46..eb5f8fb2 100644 --- a/themes/next/layout/_partials/share/baidushare.swig +++ b/_includes/_partials/share/baidushare.html @@ -1,4 +1,4 @@ -{% if theme.baidushare.type === "button" %} +{% if site.baidushare.type == "button" %}
    @@ -30,7 +30,7 @@ } } -{% elif theme.baidushare.type === "slide" %} +{% elsif site.baidushare.type == "slide" %} + + diff --git a/_includes/_scripts/boostrap.html b/_includes/_scripts/boostrap.html new file mode 100644 index 00000000..d3481ffd --- /dev/null +++ b/_includes/_scripts/boostrap.html @@ -0,0 +1,5 @@ +{% assign boot_scripts = 'src/bootstrap.js' | split: ", " %} + +{% for bs in boot_scripts %} + +{% endfor %} diff --git a/_includes/_scripts/commons.html b/_includes/_scripts/commons.html new file mode 100644 index 00000000..a37c3227 --- /dev/null +++ b/_includes/_scripts/commons.html @@ -0,0 +1,5 @@ +{% assign js_commons = 'src/utils.js, src/motion.js' | split: ", " %} + +{% for common in js_commons %} + +{% endfor %} diff --git a/_includes/_scripts/pages/pagination.html b/_includes/_scripts/pages/pagination.html new file mode 100644 index 00000000..e2a2ca69 --- /dev/null +++ b/_includes/_scripts/pages/pagination.html @@ -0,0 +1,103 @@ +{% assign paginate_path = site[page.layout].paginate_path | default: site.paginate_path %} +{% assign paginate = site[page.layout].paginate | default: site.paginate %} + +{% if paginate > 0 %} + + +{% endif %} diff --git a/_includes/_scripts/pages/post-details.html b/_includes/_scripts/pages/post-details.html new file mode 100644 index 00000000..96cdca81 --- /dev/null +++ b/_includes/_scripts/pages/post-details.html @@ -0,0 +1,2 @@ + + diff --git a/themes/next/source/css/_mixins/Mist.styl b/_includes/_scripts/schemes/mist.html similarity index 100% rename from themes/next/source/css/_mixins/Mist.styl rename to _includes/_scripts/schemes/mist.html diff --git a/themes/next/source/css/_mixins/Muse.styl b/_includes/_scripts/schemes/muse.html similarity index 100% rename from themes/next/source/css/_mixins/Muse.styl rename to _includes/_scripts/schemes/muse.html diff --git a/_includes/_scripts/schemes/pisces.html b/_includes/_scripts/schemes/pisces.html new file mode 100644 index 00000000..6f5acc85 --- /dev/null +++ b/_includes/_scripts/schemes/pisces.html @@ -0,0 +1,5 @@ +{% assign scripts = 'src/affix.js, src/schemes/pisces.js' | split: ", " %} + +{% for script in scripts %} + +{% endfor %} diff --git a/_includes/_scripts/vendors.html b/_includes/_scripts/vendors.html new file mode 100644 index 00000000..f1545da9 --- /dev/null +++ b/_includes/_scripts/vendors.html @@ -0,0 +1,50 @@ +{% comment %} Reset `window.Promise` when it was not a function. {% endcomment %} +{% comment %} IE refers the element whose id is `Promise` as `window.Promise`, this causes Velocity throwing an exception {% endcomment %} + + +{% assign js_vendors = '' %} +{% assign js_vendors = js_vendors | append: ', ' | append: 'jquery: jquery/index.js?v=2.1.3' %} +{% assign js_vendors = js_vendors | append: ', ' | append: 'fastclick: fastclick/lib/fastclick.min.js?v=1.0.6' %} +{% assign js_vendors = js_vendors | append: ', ' | append: 'lazyload: jquery_lazyload/jquery.lazyload.js?v=1.9.7' %} +{% assign js_vendors = js_vendors | append: ', ' | append: 'velocity: velocity/velocity.min.js?v=1.2.1' %} +{% assign js_vendors = js_vendors | append: ', ' | append: 'velocity_ui: velocity/velocity.ui.min.js?v=1.2.1' %} + +{% if site.fancybox %} + {% assign js_vendors = js_vendors | append: ', ' | append: 'fancybox: fancybox/source/jquery.fancybox.pack.js?v=2.1.5' %} +{% endif %} +{% if site.canvas_nest %} + {% assign js_vendors = js_vendors | append: ', ' | append: 'canvas_nest: canvas-nest/canvas-nest.min.js' %} +{% endif %} + +{% if site.three_waves %} + {% assign js_vendors = js_vendors | append: ', ' | append: 'three: three/three.min.js' %} + {% assign js_vendors = js_vendors | append: ', ' | append: 'three_waves: three/three-waves.min.js' %} +{% endif %} + +{% if site.canvas_lines %} + {% assign js_vendors = js_vendors | append: ', ' | append: 'three: three/three.min.js' %} + {% assign js_vendors = js_vendors | append: ', ' | append: 'canvas_lines: three/canvas_lines.min.js' %} +{% endif %} + +{% if site.canvas_sphere %} + {% assign js_vendors = js_vendors | append: ', ' | append: 'three: three/three.min.js' %} + {% assign js_vendors = js_vendors | append: ', ' | append: 'canvas_sphere: three/canvas_sphere.min.js' %} +{% endif %} + +{% if site.canvas_ribbon and site.scheme == 'Pisces'%} + {% assign js_vendors = js_vendors | append: ', ' | append: 'canvas_ribbon: canvas-ribbon/canvas-ribbon.js' %} +{% endif %} + +{% assign js_vendors = js_vendors | split: ", " | uniq %} +{% for js_vendor in js_vendors %} + {% assign name_internal = js_vendor | strip | split: ": " %} + {% if name_internal.size != 2 %} {% continue %} {% endif %} + {% assign name = name_internal[0] | strip %} + {% assign internal = name_internal[1] | strip %} + {% assign internal_script = site.vendors._internal | append: '/' | append: internal | relative_url %} + +{% endfor %} diff --git a/_includes/_third-party/analytics/application-insights.html b/_includes/_third-party/analytics/application-insights.html new file mode 100644 index 00000000..d14c6689 --- /dev/null +++ b/_includes/_third-party/analytics/application-insights.html @@ -0,0 +1,11 @@ +{% if site.application_insights %} + +{% endif %} diff --git a/themes/next/layout/_third-party/analytics/baidu-analytics.swig b/_includes/_third-party/analytics/baidu-analytics.html similarity index 62% rename from themes/next/layout/_third-party/analytics/baidu-analytics.swig rename to _includes/_third-party/analytics/baidu-analytics.html index 11d13424..57c3ece8 100644 --- a/themes/next/layout/_third-party/analytics/baidu-analytics.swig +++ b/_includes/_third-party/analytics/baidu-analytics.html @@ -1,9 +1,9 @@ -{% if theme.baidu_analytics %} - + + {% if site.busuanzi_count.site_uv %} + + {{ site.busuanzi_count.site_uv_header }} + + {{ site.busuanzi_count.site_uv_footer }} + + {% endif %} + + {% if site.busuanzi_count.site_pv %} + + {{ site.busuanzi_count.site_pv_header }} + + {{ site.busuanzi_count.site_pv_footer }} + + {% endif %} +
    +{% endif %} diff --git a/_includes/_third-party/analytics/cnzz-analytics.html b/_includes/_third-party/analytics/cnzz-analytics.html new file mode 100644 index 00000000..70a3bf5d --- /dev/null +++ b/_includes/_third-party/analytics/cnzz-analytics.html @@ -0,0 +1,7 @@ +{% if site.cnzz_siteid %} + +
    + +
    + +{% endif %} diff --git a/_includes/_third-party/analytics/facebook-sdk.html b/_includes/_third-party/analytics/facebook-sdk.html new file mode 100644 index 00000000..a91c2955 --- /dev/null +++ b/_includes/_third-party/analytics/facebook-sdk.html @@ -0,0 +1,19 @@ +{% if site.facebook_sdk.enable %} + +{% endif %} diff --git a/_includes/_third-party/analytics/google-analytics.html b/_includes/_third-party/analytics/google-analytics.html new file mode 100644 index 00000000..714e9a09 --- /dev/null +++ b/_includes/_third-party/analytics/google-analytics.html @@ -0,0 +1,10 @@ +{% if site.google_analytics %} + +{% endif %} diff --git a/_includes/_third-party/analytics/index.html b/_includes/_third-party/analytics/index.html new file mode 100644 index 00000000..25b5c63c --- /dev/null +++ b/_includes/_third-party/analytics/index.html @@ -0,0 +1,8 @@ +{% include _third-party/analytics/facebook-sdk.html %} +{% include _third-party/analytics/vkontakte-api.html %} +{% include _third-party/analytics/google-analytics.html %} +{% include _third-party/analytics/baidu-analytics.html %} +{% include _third-party/analytics/tencent-analytics.html %} +{% include _third-party/analytics/tencent-mta.html %} +{% include _third-party/analytics/cnzz-analytics.html %} +{% include _third-party/analytics/application-insights.html %} diff --git a/_includes/_third-party/analytics/lean-analytics.html b/_includes/_third-party/analytics/lean-analytics.html new file mode 100644 index 00000000..1b9df528 --- /dev/null +++ b/_includes/_third-party/analytics/lean-analytics.html @@ -0,0 +1,108 @@ +{% if site.leancloud_visitors.enable %} + + {% comment %} custom analytics part create by xiamo {% endcomment %} + + + + +{% endif %} diff --git a/themes/next/layout/_third-party/analytics/tencent-analytics.swig b/_includes/_third-party/analytics/tencent-analytics.html similarity index 59% rename from themes/next/layout/_third-party/analytics/tencent-analytics.swig rename to _includes/_third-party/analytics/tencent-analytics.html index adc1fc3f..acf2cd1f 100644 --- a/themes/next/layout/_third-party/analytics/tencent-analytics.swig +++ b/_includes/_third-party/analytics/tencent-analytics.html @@ -1,8 +1,8 @@ -{% if theme.tencent_analytics %} - +{% endif %} diff --git a/_includes/_third-party/analytics/vkontakte-api.html b/_includes/_third-party/analytics/vkontakte-api.html new file mode 100644 index 00000000..88bca549 --- /dev/null +++ b/_includes/_third-party/analytics/vkontakte-api.html @@ -0,0 +1,29 @@ +{% if site.vkontakte_api.enable %} + +
    + + +{% endif %} diff --git a/_includes/_third-party/comments/changyan.html b/_includes/_third-party/comments/changyan.html new file mode 100644 index 00000000..9472a32f --- /dev/null +++ b/_includes/_third-party/comments/changyan.html @@ -0,0 +1,18 @@ +{% if site.changyan.enable and site.changyan.appid and site.changyan.appkey %} + {% if page.home %} + + {% else %} + + + {% endif %} +{% endif %} diff --git a/_includes/_third-party/comments/disqus.html b/_includes/_third-party/comments/disqus.html new file mode 100644 index 00000000..6236c128 --- /dev/null +++ b/_includes/_third-party/comments/disqus.html @@ -0,0 +1,68 @@ +{% unless site.duoshuo_shortname or site.duoshuo and site.duoshuo.shortname %} + {% if site.disqus.enable %} + + {% if site.disqus.count %} + + {% endif %} + + {% if page.comments %} + {% if site.disqus.hide %} + + {% else %} + + {% endif %} + {% endif %} + + {% endif %} +{% endunless %} diff --git a/_includes/_third-party/comments/duoshuo.html b/_includes/_third-party/comments/duoshuo.html new file mode 100644 index 00000000..929dadf7 --- /dev/null +++ b/_includes/_third-party/comments/duoshuo.html @@ -0,0 +1,33 @@ +{% if site.duoshuo_shortname or site.duoshuo and site.duoshuo.shortname %} + + {% if site.duoshuo %} + {% assign duoshuo_shortname = site.duoshuo.shortname %} + {% else %} + {% assign duoshuo_shortname = site.duoshuo_shortname %} + {% endif %} + + + + {% if site.duoshuo_info.ua_enable %} + {% if site.duoshuo_info.admin_enable %} + {% assign ua_parser_internal = site.vendors._internal | append: '/ua-parser-js/dist/ua-parser.min.js?v=0.7.9' | relative_url %} + + + {% endif %} + {% assign ua_parser_internal = site.vendors._internal | append: '/ua-parser-js/dist/ua-parser.min.js?v=0.7.9' | relative_url %} + + + {% endif %} + +{% endif %} diff --git a/_includes/_third-party/comments/gentie.html b/_includes/_third-party/comments/gentie.html new file mode 100644 index 00000000..dfa5d0c3 --- /dev/null +++ b/_includes/_third-party/comments/gentie.html @@ -0,0 +1,16 @@ +{% unless site.disqus_shortname or site.hypercomments_id or site.duoshuo_shortname or site.duoshuo and site.duoshuo.shortname %} + + {% if site.gentie_productKey %} + {% assign gentie_productKey = site.gentie_productKey %} + + + {% endif %} + +{% endunless %} diff --git a/_includes/_third-party/comments/gitalk.html b/_includes/_third-party/comments/gitalk.html new file mode 100644 index 00000000..06104f45 --- /dev/null +++ b/_includes/_third-party/comments/gitalk.html @@ -0,0 +1,28 @@ +{% unless site.duoshuo_shortname + or site.disqus_shortname + or site.hypercomments_id + or site.gentie_productKey + or site.duoshuo and site.duoshuo.shortname %} + +{% if site.gitalk.enable %} + + + + + +{% endif %} + +{% endunless %} diff --git a/_includes/_third-party/comments/hypercomments.html b/_includes/_third-party/comments/hypercomments.html new file mode 100644 index 00000000..69b5493b --- /dev/null +++ b/_includes/_third-party/comments/hypercomments.html @@ -0,0 +1,27 @@ +{% unless site.disqus_shortname or site.duoshuo_shortname or site.duoshuo and site.duoshuo.shortname %} + + {% if site.hypercomments_id %} + + + + {% endif %} + +{% endunless %} diff --git a/_includes/_third-party/comments/index.html b/_includes/_third-party/comments/index.html new file mode 100644 index 00000000..6e20bf36 --- /dev/null +++ b/_includes/_third-party/comments/index.html @@ -0,0 +1,9 @@ +{% include _third-party/comments/duoshuo.html %} +{% include _third-party/comments/disqus.html %} +{% include _third-party/comments/hypercomments.html %} +{% include _third-party/comments/gentie.html %} +{% include _third-party/comments/gitalk.html %} +{% include _third-party/comments/youyan.html %} +{% include _third-party/comments/livere.html %} +{% include _third-party/comments/changyan.html %} +{% include _third-party/comments/wildfire.html %} diff --git a/_includes/_third-party/comments/livere.html b/_includes/_third-party/comments/livere.html new file mode 100644 index 00000000..12f5ae2a --- /dev/null +++ b/_includes/_third-party/comments/livere.html @@ -0,0 +1,18 @@ +{% unless site.duoshuo and site.duoshuo.shortname %} + {% unless site.hypercomments_id or site.gentie_productKey or site.duoshuo_shortname or site.disqus.enable and site.disqus.shortname %} + + {% if page.comments and site.livere_uid %} + + {% endif %} + + {% endunless %} +{% endunless %} diff --git a/_includes/_third-party/comments/wildfire.html b/_includes/_third-party/comments/wildfire.html new file mode 100644 index 00000000..7b07d39b --- /dev/null +++ b/_includes/_third-party/comments/wildfire.html @@ -0,0 +1,44 @@ +{% if site.wildfire.enable %} + + {% if page.comments %} + {% if site.wildfire.loaderVersion %} + + {% else %} + + {% endif %} + {% endif %} + +{% endif %} diff --git a/_includes/_third-party/comments/youyan.html b/_includes/_third-party/comments/youyan.html new file mode 100644 index 00000000..ac96d774 --- /dev/null +++ b/_includes/_third-party/comments/youyan.html @@ -0,0 +1,17 @@ +{% unless site.duoshuo_shortname + or site.disqus_shortname + or site.hypercomments_id + or site.gentie_productKey + or site.duoshuo and site.duoshuo.shortname %} + + {% if site.youyan_uid %} + {% assign uid = site.youyan_uid %} + + {% if page.comments %} + + + + {% endif %} + {% endif %} + +{% endunless %} diff --git a/_includes/_third-party/duoshuo-hot-articles.html b/_includes/_third-party/duoshuo-hot-articles.html new file mode 100644 index 00000000..d1741bb1 --- /dev/null +++ b/_includes/_third-party/duoshuo-hot-articles.html @@ -0,0 +1,5 @@ +{% comment %} 多说热评文章 {% endcomment %} +{% if site.duoshuo_hotartical and page.title %} +

    热评文章

    +
    +{% endif %} diff --git a/_includes/_third-party/exturl.html b/_includes/_third-party/exturl.html new file mode 100644 index 00000000..610fd32d --- /dev/null +++ b/_includes/_third-party/exturl.html @@ -0,0 +1,3 @@ +{% if site.exturl %} + +{% endif %} diff --git a/_includes/_third-party/mathjax.html b/_includes/_third-party/mathjax.html new file mode 100644 index 00000000..220ca458 --- /dev/null +++ b/_includes/_third-party/mathjax.html @@ -0,0 +1,23 @@ +{% if site.mathjax.enable %} + {% if page.layout == 'index' or page.mathjax or site.mathjax.per_page == nil or site.mathjax.per_page == false %} + + + + + {% endif %} +{% endif %} diff --git a/themes/next/layout/_third-party/rating.swig b/_includes/_third-party/rating.html similarity index 62% rename from themes/next/layout/_third-party/rating.swig rename to _includes/_third-party/rating.html index e51e0945..f1f25063 100644 --- a/themes/next/layout/_third-party/rating.swig +++ b/_includes/_third-party/rating.html @@ -1,11 +1,10 @@ -{% if theme.rating.enable and (not is_home() and is_post()) %} - -{% endif %} + + {% endif %} +{% endunless %} diff --git a/_includes/_third-party/schedule.html b/_includes/_third-party/schedule.html new file mode 100644 index 00000000..6aa59780 --- /dev/null +++ b/_includes/_third-party/schedule.html @@ -0,0 +1,185 @@ +{% if site.calendar.enable %} +{% if page.type == 'schedule' %} + + + +{% endif %} +{% endif %} diff --git a/_includes/_third-party/scroll-cookie.html b/_includes/_third-party/scroll-cookie.html new file mode 100644 index 00000000..6f515fc3 --- /dev/null +++ b/_includes/_third-party/scroll-cookie.html @@ -0,0 +1,4 @@ +{% if site.save_scroll %} + + +{% endif %} diff --git a/_includes/_third-party/search/algolia-search/assets.html b/_includes/_third-party/search/algolia-search/assets.html new file mode 100644 index 00000000..076e1d16 --- /dev/null +++ b/_includes/_third-party/search/algolia-search/assets.html @@ -0,0 +1,18 @@ +{% if site.algolia_search.enable %} + + {% comment %} S: Include Algolia instantsearch.js library {% endcomment %} + {% assign algolia_instant_css = site.vendors._internal | append: '/algolia-instant-search/instantsearch.min.css' | relative_url %} + {% if site.vendors.algolia_instant_css %} + {% assign algolia_instant_css = site.vendors.algolia_instant_css %} + {% endif %} + + + {% assign algolia_instant_js = site.vendors._internal | append: '/algolia-instant-search/instantsearch.min.js' | relative_url %} + {% if site.vendors.algolia_instant_js %} + {% assign algolia_instant_js = site.vendors.algolia_instant_js %} + {% endif %} + + {% comment %} E: Include Algolia instantsearch.js library {% endcomment %} + + +{% endif %} diff --git a/themes/next/layout/_partials/search/algolia-search.swig b/_includes/_third-party/search/algolia-search/dom.html similarity index 93% rename from themes/next/layout/_partials/search/algolia-search.swig rename to _includes/_third-party/search/algolia-search/dom.html index a733bb17..63a2c5e5 100644 --- a/themes/next/layout/_partials/search/algolia-search.swig +++ b/_includes/_third-party/search/algolia-search/dom.html @@ -1,4 +1,4 @@ -{% if theme.algolia_search.enable %} +{% if site.algolia_search.enable %}