diff --git a/.travis.yml b/.travis.yml index 17ded23a..e193e371 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,28 @@ language: ruby cache: bundler -before_install: - - gem install bundler +install: +- script/rebund download +- bundle install --path vendor/bundle rvm: - - 2.1.0 - - 2.0.0 - - 1.9.3 - - 1.9.2 -script: bundle exec rake +- 2.1.0 +- 2.0.0 +- 1.9.3 +- 1.9.2 +script: script/cibuild +after_script: +- script/rebund upload notifications: irc: on_success: change on_failure: change channels: - - "irc.freenode.org#jekyll" - #on_success: change - #on_failure: change + - irc.freenode.org#jekyll template: - - "%{repository}#%{build_number} (%{branch}) %{message} %{build_url}" + - '%{repository}#%{build_number} (%{branch}) %{message} %{build_url}' email: on_success: never on_failure: never +env: + global: + - secure: YFgVNymO2MvA7ieB3hJKQ9cF8zhi5uc3NnBx+ngs6+XF7lV7zYZGMYJ9ufEuPRkXFEI1sSNQJjOQwjmqC71xABrWw6B69XDdYgoTX+53GryVfsrDIPksQo89WAAMKqoPznWtj5fA3OTxUWjHVye2JsduPNuihpniI5j79IzDFQY= + - secure: YrDB4baCV00FPyRafR9UTAUsSgK/07Re+7T+blgX2gK/j54DJdof+EYbQPjc3HeWdfQgIzal2+KkwBItEu2lA8/j6qPwUngd9oRWJPLm19xFizECRY9SD1BxU53T3qmnoYqG0jFvKgYfnn9ggHRDEL31YDOA1monhFhq/8S3SdA= diff --git a/History.markdown b/History.markdown index 9145f044..a6ffeeaf 100644 --- a/History.markdown +++ b/History.markdown @@ -8,6 +8,10 @@ * Move to jekyll/jekyll from mojombo/jekyll (#1817) * Allow custom markdown processors (#1872) * Provide support for the Rouge syntax highlighter (#1859) + * Provide support for Sass (#1932) + * Provide a 300% improvement when generating sites that use + `Post#next` or `Post#previous` (#1983) + * Provide support for CoffeeScript (#1991) ### Minor Enhancements * Move the EntryFilter class into the Jekyll module to avoid polluting the @@ -28,6 +32,8 @@ (#1875) * Route 404 errors to a custom 404 page in development (#1899) * Excludes are now relative to the site source (#1916) + * Bring MIME Types file for `jekyll serve` to complete parity with GH Pages + servers (#1993) ### Bug Fixes * Don't allow nil entries when loading posts (#1796) @@ -38,6 +44,10 @@ * Change short opts for host and port for `jekyll docs` to be consistent with other subcommands (#1877) * Fix typos (#1910) + * Lock Maruku at 0.7.0 to prevent bugs caused by Maruku 0.7.1 (#1958) + * Fixes full path leak to source directory when using include tag (#1951) + * Don't generate pages that aren't being published (#1931) + * Use `SafeYAML.load` to avoid conflicts with other projects (#1982) ### Development Fixes * Add a link to the site in the README.md file (#1795) @@ -51,6 +61,11 @@ (#1927) * Rename `read_things` to `read_content` (#1928) * Add `script/branding` script for ASCII art lovin' (#1936) + * Update the README to reflect the repo move (#1943) + * Add the project vision to the README (#1935) + * Speed up Travis CI builds by using Rebund (#1985) + * Use Yarp as a Gem proxy for Travis CI (#1984) + * Remove Yarp as a Gem proxy for Travis CI (#2004) ### Site Enhancements * Document Kramdown's GFM parser option (#1791) @@ -74,6 +89,22 @@ * Add additional info about the new exclude behavior (#1938) * Linkify 'awesome contributors' to point to the contributors graph on GitHub (#1940) + * Update `docs/sites.md` link to GitHub Training materials (#1949) + * Update `master` with the release info from 1.4.3 (#1947) + * Define docs nav in datafile (#1953) + * Clarify the docs around the naming convention for posts (#1971) + * Add missing `next` and `previous` docs for post layouts and templates (#1970) + * Add note to `Writing posts` page about how to strip html from excerpt (#1962) + * Add `jekyll-humanize` plugin to plugin list (#1998) + * Add `jekyll-font-awesome` plugin to plugin list (#1999) + * Add `sublime-jekyll` to list of Editor plugins (#2001) + * Add `vim-jekyll` to the list of Editor plugins (#2005) + * Fix non-semantic nesting of `p` tags in `news_item` layout (#2013) + +## 1.4.3 / 2014-01-13 + +### Bug Fixes + * Patch show-stopping security vulnerabilities (#1944) ## 1.4.2 / 2013-12-16 diff --git a/README.markdown b/README.markdown index f56cb4ca..228881db 100644 --- a/README.markdown +++ b/README.markdown @@ -9,7 +9,11 @@ By Tom Preston-Werner, Nick Quaranto, and many [awesome contributors](https://github.com/jekyll/jekyll/graphs/contributors)! -Jekyll is a simple, blog aware, static site generator. It takes a template directory (representing the raw form of a website), runs it through Textile or Markdown and Liquid converters, and spits out a complete, static website suitable for serving with Apache or your favorite web server. This is also the engine behind [GitHub Pages](http://pages.github.com), which you can use to host your project's page or blog right here from GitHub. +Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](http://pages.github.com), which you can use to host sites right from your GitHub repositories. + +## Philosophy + +Jekyll does what you tell it to do — no more, no less. It doesn't try to outsmart users by making bold assumptions, nor does it burden them with needless complexity and configuration. Put simply, Jekyll gets out of your way and allows you to concentrate on what truly matters: your content. ## Getting Started diff --git a/jekyll.gemspec b/jekyll.gemspec index 1608ce76..b78a6e13 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -5,9 +5,9 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 1.9.2' s.name = 'jekyll' - s.version = '1.4.0' + s.version = '1.4.3' s.license = 'MIT' - s.date = '2013-12-09' + s.date = '2014-01-13' s.rubyforge_project = 'jekyll' s.summary = "A simple, blog aware, static site generator." @@ -24,16 +24,18 @@ Gem::Specification.new do |s| s.rdoc_options = ["--charset=UTF-8"] s.extra_rdoc_files = %w[README.markdown LICENSE] - s.add_runtime_dependency('liquid', "~> 2.5.2") + s.add_runtime_dependency('liquid', "~> 2.5.5") s.add_runtime_dependency('classifier', "~> 1.3") s.add_runtime_dependency('listen', "~> 1.3") - s.add_runtime_dependency('maruku', "~> 0.7.0") + s.add_runtime_dependency('maruku', "0.7.0") s.add_runtime_dependency('pygments.rb', "~> 0.5.0") s.add_runtime_dependency('mercenary', "~> 0.2.0") s.add_runtime_dependency('safe_yaml', "~> 1.0") s.add_runtime_dependency('colorator', "~> 0.1") s.add_runtime_dependency('redcarpet', "~> 3.0") s.add_runtime_dependency('toml', '~> 0.1.0') + s.add_runtime_dependency('sass', '~> 3.2') + s.add_runtime_dependency('jekyll-coffeescript', '~> 1.0') s.add_development_dependency('rake', "~> 10.1") s.add_development_dependency('rdoc', "~> 3.11") @@ -94,6 +96,7 @@ Gem::Specification.new do |s| lib/jekyll/converters/markdown/maruku_parser.rb lib/jekyll/converters/markdown/rdiscount_parser.rb lib/jekyll/converters/markdown/redcarpet_parser.rb + lib/jekyll/converters/sass.rb lib/jekyll/converters/textile.rb lib/jekyll/convertible.rb lib/jekyll/core_ext.rb @@ -128,10 +131,14 @@ Gem::Specification.new do |s| lib/site_template/css/syntax.css lib/site_template/index.html script/bootstrap + script/branding + script/cibuild + script/rebund site/.gitignore site/CNAME site/README site/_config.yml + site/_data/docs.yml site/_includes/analytics.html site/_includes/css/gridism.css site/_includes/css/normalize.css @@ -167,7 +174,11 @@ Gem::Specification.new do |s| site/_posts/2013-11-04-jekyll-1-3-0-released.markdown site/_posts/2013-11-26-jekyll-1-3-1-released.markdown site/_posts/2013-12-07-jekyll-1-4-0-released.markdown + site/_posts/2013-12-09-jekyll-1-4-1-released.markdown + site/_posts/2013-12-16-jekyll-1-4-2-released.markdown + site/_posts/2014-01-13-jekyll-1-4-3-released.markdown site/css/screen.css + site/docs/assets.md site/docs/configuration.md site/docs/contributing.md site/docs/datafiles.md @@ -195,6 +206,7 @@ Gem::Specification.new do |s| site/docs/upgrading.md site/docs/usage.md site/docs/variables.md + site/docs/windows.md site/favicon.png site/feed.xml site/freenode.txt @@ -220,7 +232,7 @@ Gem::Specification.new do |s| test/source/_config.dev.toml test/source/_data/languages.yml test/source/_data/members.yaml - test/source/_data/products.yml + test/source/_includes/include.html test/source/_includes/params.html test/source/_includes/sig.markdown test/source/_layouts/default.html @@ -260,6 +272,8 @@ Gem::Specification.new do |s| test/source/_posts/2013-05-10-number-category.textile test/source/_posts/2013-07-22-post-excerpt-with-layout.markdown test/source/_posts/2013-08-01-mkdn-extension.mkdn + test/source/_posts/2013-12-17-include-variable-filters.markdown + test/source/_posts/2013-12-20-properties.text test/source/_posts/es/2008-11-21-nested.textile test/source/about.html test/source/category/_posts/2008-9-23-categories.textile @@ -270,14 +284,15 @@ Gem::Specification.new do |s| test/source/deal.with.dots.html test/source/foo/_posts/bar/2008-12-12-topical-post.textile test/source/index.html + test/source/js/coffeescript.coffee test/source/products.yml + test/source/properties.html test/source/sitemap.xml - test/source/symlink-test/_data - test/source/symlink-test/symlinked-dir - test/source/symlink-test/symlinked-file + test/source/unpublished.html test/source/win/_posts/2009-05-24-yaml-linebreak.markdown test/source/z_category/_posts/2008-9-23-categories.textile test/suite.rb + test/test_coffeescript.rb test/test_command.rb test/test_configuration.rb test/test_convertible.rb @@ -295,6 +310,7 @@ Gem::Specification.new do |s| test/test_redcarpet.rb test/test_redcloth.rb test/test_related_posts.rb + test/test_sass.rb test/test_site.rb test/test_tags.rb test/test_url.rb diff --git a/lib/jekyll.rb b/lib/jekyll.rb index 4b45e2ba..caa45e50 100644 --- a/lib/jekyll.rb +++ b/lib/jekyll.rb @@ -18,7 +18,7 @@ require 'rubygems' # stdlib require 'fileutils' require 'time' -require 'safe_yaml' +require 'safe_yaml/load' require 'English' require 'pathname' @@ -27,6 +27,7 @@ require 'liquid' require 'maruku' require 'colorator' require 'toml' +require 'sass' # internal requires require 'jekyll/core_ext' @@ -60,6 +61,9 @@ require_all 'jekyll/converters/markdown' require_all 'jekyll/generators' require_all 'jekyll/tags' +# plugins +require 'jekyll-coffeescript' + SafeYAML::OPTIONS[:suppress_warnings] = true module Jekyll diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index f5e10fe0..afa43d30 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -105,7 +105,7 @@ module Jekyll when '.toml' TOML.load_file(filename) when /\.y(a)?ml/ - YAML.safe_load_file(filename) + SafeYAML.load_file(filename) else raise ArgumentError, "No parser for '#{filename}' is available. Use a .toml or .y(a)ml file instead." end diff --git a/lib/jekyll/converters/sass.rb b/lib/jekyll/converters/sass.rb new file mode 100644 index 00000000..0c36eb65 --- /dev/null +++ b/lib/jekyll/converters/sass.rb @@ -0,0 +1,58 @@ +module Jekyll + class Sass < Converter + safe true + priority :low + + def matches(ext) + ext =~ /^\.s(a|c)ss$/i + end + + def output_ext(ext) + ".css" + end + + def jekyll_sass_configuration + @config["sass"] || {} + end + + def sass_build_configuration_options(overrides) + jekyll_sass_configuration.deep_merge(overrides).symbolize_keys + end + + def syntax_type_of_content(content) + if content.include?(";") || content.include?("{") + :scss + else + :sass + end + end + + def sass_dir + return "_sass" if jekyll_sass_configuration["sass_dir"].to_s.empty? + jekyll_sass_configuration["sass_dir"] + end + + def sass_dir_relative_to_site_source + File.join( + @config["source"], + File.expand_path(sass_dir, "/") # FIXME: Not windows-compatible + ) + end + + def allow_caching? + !@config["safe"] + end + + def sass_configs(content = "") + sass_build_configuration_options({ + "syntax" => syntax_type_of_content(content), + "cache" => allow_caching?, + "load_paths" => [sass_dir_relative_to_site_source] + }) + end + + def convert(content) + ::Sass.compile(content, sass_configs(content)) + end + end +end diff --git a/lib/jekyll/convertible.rb b/lib/jekyll/convertible.rb index f838d29b..941312f3 100644 --- a/lib/jekyll/convertible.rb +++ b/lib/jekyll/convertible.rb @@ -21,6 +21,11 @@ module Jekyll self.content || '' end + # Whether the file is published or not, as indicated in YAML front-matter + def published? + !(self.data.has_key?('published') && self.data['published'] == false) + end + # Returns merged option hash for File.read of self.site (if exists) # and a given param def merged_file_read_opts(opts) @@ -40,7 +45,7 @@ module Jekyll merged_file_read_opts(opts)) if self.content =~ /\A(---\s*\n.*?\n?)^(---\s*$\n?)/m self.content = $POSTMATCH - self.data = YAML.safe_load($1) + self.data = SafeYAML.load($1) end rescue SyntaxError => e puts "YAML Exception reading #{File.join(base, name)}: #{e.message}" diff --git a/lib/jekyll/mime.types b/lib/jekyll/mime.types index b926a009..ee7aa44c 100644 --- a/lib/jekyll/mime.types +++ b/lib/jekyll/mime.types @@ -1,12 +1,13 @@ -# These are the same MIME types that GitHub Pages uses as of 17 Mar 2013. +-# These are the same MIME types that GitHub Pages uses as of 26 January 2014 text/html html htm shtml text/css css -text/xml xml rss xsl +text/xml xml rss xsl xsd image/gif gif image/jpeg jpeg jpg application/x-javascript js application/atom+xml atom +application/json json geojson topojson text/mathml mml text/plain txt @@ -17,16 +18,22 @@ text/cache-manifest manifest appcache text/coffeescript coffee text/plain pde text/plain md markdown +text/vcard vcf vcard image/png png image/svg+xml svg +image/svg+xml svgz image/tiff tif tiff image/vnd.wap.wbmp wbmp image/x-icon ico image/x-jng jng image/x-ms-bmp bmp -application/json json +application/vnd.ms-fontobject eot +application/x-font-ttf ttf +application/x-font-woff woff +font/opentype otf + application/java-archive jar ear application/mac-binhex40 hqx application/msword doc @@ -34,18 +41,19 @@ application/pdf pdf application/postscript ps eps ai application/rdf+xml rdf application/rtf rtf -text/vcard vcf vcard application/vnd.apple.pkpass pkpass application/vnd.ms-excel xls application/vnd.ms-powerpoint ppt application/vnd.wap.wmlc wmlc application/xhtml+xml xhtml -application/x-chrome-extension crx application/x-cocoa cco -application/x-font-ttf ttf +application/x-chrome-extension crx application/x-java-archive-diff jardiff application/x-java-jnlp-file jnlp application/x-makeself run +application/x-ms-application application +application/x-ms-manifest manifest +application/x-ms-vsto vsto application/x-ns-proxy-autoconfig pac application/x-perl pl pm application/x-pilot prc pdb @@ -63,8 +71,8 @@ application/zip zip application/octet-stream bin exe dll application/octet-stream deb +application/octet-stream deploy application/octet-stream dmg -application/octet-stream eot application/octet-stream iso img application/octet-stream msi msp msm @@ -74,12 +82,14 @@ audio/x-realaudio ra audio/ogg ogg video/3gpp 3gpp 3gp +video/m4v m4v +video/mp4 mp4 video/mpeg mpeg mpg +video/ogg ogg ogv video/quicktime mov +video/webm webm video/x-flv flv video/x-mng mng video/x-ms-asf asx asf video/x-ms-wmv wmv video/x-msvideo avi -video/ogg ogv -video/webm webm diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index f9e678c6..31ed2032 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -35,7 +35,7 @@ module Jekyll attr_accessor :site attr_accessor :data, :extracted_excerpt, :content, :output, :ext - attr_accessor :date, :slug, :published, :tags, :categories + attr_accessor :date, :slug, :tags, :categories attr_reader :name @@ -60,20 +60,10 @@ module Jekyll self.date = Time.parse(self.data["date"].to_s) end - self.published = self.published? - self.populate_categories self.populate_tags end - def published? - if self.data.has_key?('published') && self.data['published'] == false - false - else - true - end - end - def populate_categories if self.categories.empty? self.categories = self.data.pluralized_array('category', 'categories').map {|c| c.to_s.downcase} @@ -281,8 +271,7 @@ module Jekyll end def next - pos = self.site.posts.index(self) - + pos = self.site.posts.index {|post| post.equal?(self) } if pos && pos < self.site.posts.length-1 self.site.posts[pos+1] else @@ -291,7 +280,7 @@ module Jekyll end def previous - pos = self.site.posts.index(self) + pos = self.site.posts.index {|post| post.equal?(self) } if pos && pos > 0 self.site.posts[pos-1] else diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index c3d68507..7457ca6d 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -170,7 +170,8 @@ module Jekyll f_rel = File.join(dir, f) read_directories(f_rel) unless self.dest.sub(/\/$/, '') == f_abs elsif has_yaml_header?(f_abs) - pages << Page.new(self, self.source, dir, f) + page = Page.new(self, self.source, dir, f) + pages << page if page.published? else static_files << StaticFile.new(self, self.source, dir, f) end @@ -189,7 +190,7 @@ module Jekyll posts = read_content(dir, '_posts', Post) posts.each do |post| - if post.published && (self.future || post.date <= self.time) + if post.published? && (self.future || post.date <= self.time) aggregate_post_info(post) end end @@ -232,7 +233,7 @@ module Jekyll next if File.symlink?(path) && self.safe key = sanitize_filename(File.basename(entry, '.*')) - self.data[key] = YAML.safe_load_file(path) + self.data[key] = SafeYAML.load_file(path) end end diff --git a/script/rebund b/script/rebund new file mode 100755 index 00000000..7aa2db2c --- /dev/null +++ b/script/rebund @@ -0,0 +1,140 @@ +#!/bin/bash +# +# rebund(1) +# +# Author: Julien Letessier +# Homepage: https://github.com/mezis/rebund +# License: +# +# Copyright (c) 2014 HouseTrip Ltd +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +# Configuration +: ${REBUND_CREDENTIALS:=user:secret} +: ${REBUND_ENDPOINT=http://keyfile-production.herokuapp.com} +: ${REBUND_TARBALL:=bundle.tbz} +: ${REBUND_BUNDLE_DIR:=vendor/bundle} + + + +log() { + echo "rebund: $*" > /dev/stderr +} + +die() { + echo "fatal: $*" > /dev/stderr + exit 1 +} + +success() { + log "$*" + exit 0 +} + +on_error() { + die 'unknown error.' +} + +get_ruby_version() { + bundle exec ruby --version +} + +get_gemfile() { + bundle exec sh -c 'echo $BUNDLE_GEMFILE' +} + +calculate_hash() { + (get_ruby_version ; cat $(get_gemfile)) | openssl sha256 | sed -e 's/.* //' +} + +build_tarball() { + test -e $REBUND_BUNDLE_DIR || die "cannot find bundle directory in ${REBUND_BUNDLE_DIR}" + test -e $REBUND_TARBALL && success 'bundle already uploaded' + tar jcf $REBUND_TARBALL $REBUND_BUNDLE_DIR +} + +upload_tarball() { + curl --fail \ + -F filedata=@${REBUND_TARBALL} \ + --digest --user $REBUND_CREDENTIALS \ + ${REBUND_ENDPOINT}/$(calculate_hash) \ + || success "could not upload bundle" +} + +expand_tarball() { + test -e $REBUND_TARBALL || success "no tarball" + tar jxf $REBUND_TARBALL +} + +download_tarball() { + curl --fail \ + --location \ + -o ${REBUND_TARBALL} \ + --digest --user $REBUND_CREDENTIALS \ + ${REBUND_ENDPOINT}/$(calculate_hash) \ + || success "could not download bundle" +} + +rebund_upload() { + build_tarball + upload_tarball +} + +rebund_download() { + download_tarball + expand_tarball +} + +rebund_usage() { + success "usage: $0 [-v] [upload|download]" +} + +# cath errors +trap on_error ERR + +# inherit the ERR trap in subprocesses +set -E + +while test $# -gt 0 ; do + case $1 in + -v) + set -x + ;; + upload) + rebund_upload + exit 0 + ;; + download) + rebund_download + exit 0 + ;; + *) + rebund_usage + exit 1 + ;; + esac + shift +done + +rebund_usage diff --git a/site/_data/docs.yml b/site/_data/docs.yml new file mode 100644 index 00000000..1c790636 --- /dev/null +++ b/site/_data/docs.yml @@ -0,0 +1,44 @@ +- title: Getting Started + docs: + - home + - quickstart + - installation + - usage + - structure + - configuration + +- title: Your Content + docs: + - frontmatter + - posts + - drafts + - pages + - variables + - datafiles + - assets + - migrations + +- title: Customization + docs: + - templates + - permalinks + - pagination + - plugins + - extras + +- title: Deployment + docs: + - github-pages + - deployment-methods + +- title: Miscellaneous + docs: + - troubleshooting + - sites + - resources + - upgrading + +- title: Meta + docs: + - contributing + - history diff --git a/site/_includes/docs_contents.html b/site/_includes/docs_contents.html index 523b5227..2ac64bb4 100644 --- a/site/_includes/docs_contents.html +++ b/site/_includes/docs_contents.html @@ -1,16 +1,8 @@
diff --git a/site/_includes/docs_contents_mobile.html b/site/_includes/docs_contents_mobile.html index bbc367d4..b3e0110c 100644 --- a/site/_includes/docs_contents_mobile.html +++ b/site/_includes/docs_contents_mobile.html @@ -1,23 +1,10 @@+
diff --git a/site/docs/posts.md b/site/docs/posts.md index f93eb6b5..a8f918f8 100644 --- a/site/docs/posts.md +++ b/site/docs/posts.md @@ -155,6 +155,8 @@ If you don't like the automatically-generated post excerpt, it can be overridden `excerpt` to your post's YAML front-matter. Completely disable it by setting your `excerpt_separator` to `""`. +Also, as with any output generated by Liquid tags, you can pass the `| strip_html` flag to remove any html tags in the output. This is particularly helpful if you wish to output a post excerpt as a `meta="description"` tag within the post `head`, or anywhere else having html tags along with the content is not desirable. + ## Highlighting code snippets Jekyll also has built-in support for syntax highlighting of code snippets using diff --git a/site/docs/structure.md b/site/docs/structure.md index d03baee0..c178a65f 100644 --- a/site/docs/structure.md +++ b/site/docs/structure.md @@ -113,7 +113,7 @@ An overview of what each of these does:
- Your dynamic content, so to speak. The format of these files is
+ Your dynamic content, so to speak. The naming convention of these files is
important, and must follow the format:
YEAR-MONTH-DAY-title.MARKUP
.
The permalinks can be customized for each
diff --git a/site/docs/variables.md b/site/docs/variables.md
index 89e11a52..96578311 100644
--- a/site/docs/variables.md
+++ b/site/docs/variables.md
@@ -244,6 +244,24 @@ following is a reference of the available data.
page.next
+
+ The next post relative to the position of the current post in
+ site.posts
. Returns nil
for the last entry.
+
+
page.previous
+
+ The previous post relative to the position of the current post in
+ site.posts
. Returns nil
for the first entry.
+
+