diff --git a/docs/_data/jekyll_variables.yml b/docs/_data/jekyll_variables.yml index b3f493c8..7f41a15b 100644 --- a/docs/_data/jekyll_variables.yml +++ b/docs/_data/jekyll_variables.yml @@ -16,6 +16,10 @@ global: description: >- Layout specific information + the front matter. Custom variables set via front matter in layouts will be available here. + - name: theme + description: >- + Theme-gem specific information as defined in the theme's gemspec. Useful for rendering + information in the theme demo's "About" page, for example. See below for details. - name: content description: >- In layout files, the rendered content of the Post or Page being wrapped. @@ -150,6 +154,20 @@ page: The previous post relative to the position of the current post in site.posts. Returns nil for the first entry. +theme: + - name: theme.root + description: Absolute path to the theme-gem. + - name: theme.authors + description: Comma separated string composed of the authors of the theme-gem. + - name: theme.description + description: Description or summary of the theme-gem as specified in the theme gemspec. + - name: theme.version + description: The version string of current theme. + - name: theme.dependencies + description: List of runtime dependencies of the theme. + - name: theme.metadata + description: A mapping of key-value pairs as defined in the theme gemspec. + paginator: - name: paginator.page description: The number of the current page diff --git a/docs/_docs/variables.md b/docs/_docs/variables.md index e42f9320..f6d3b83a 100644 --- a/docs/_docs/variables.md +++ b/docs/_docs/variables.md @@ -34,6 +34,10 @@ The following is a reference of the available data.

+## Theme + +{% include docs_variables_table.html scope=site.data.jekyll_variables.theme %} + ## Paginator {% include docs_variables_table.html scope=site.data.jekyll_variables.paginator %} diff --git a/lib/jekyll/drops/theme_drop.rb b/lib/jekyll/drops/theme_drop.rb index a641fbea..b4625328 100644 --- a/lib/jekyll/drops/theme_drop.rb +++ b/lib/jekyll/drops/theme_drop.rb @@ -3,7 +3,7 @@ module Jekyll module Drops class ThemeDrop < Drop - delegate_methods :root, :version + delegate_methods :root delegate_method_as :runtime_dependencies, :dependencies def authors