CONFIGURATION_DATA
site.[CONFIGURATION_DATA]: All the variables set via the command line and your_config.ymlare available through the site variable. For example, if you havefoo: barin your configuration file, then it will be accessible in Liquid assite.foo. Jekyll does not parse changes to_config.ymlinwatchmode, you must restart Jekyll to see changes to variables.
URL
site.url: Contains the url of your site as it is configured in the_config.yml. For example, if you haveurl: http://mysite.comin your configuration file, then it will be accessible in Liquid assite.url. For the development environment there is an exception, if you are runningjekyll servein a development environmentsite.urlwill be set to the value ofhost,port, and SSL-related options. This defaults tourl: http://localhost:4000.
Pages and Posts
Pages
site.pages: A list of all Pages.site.html_pages: A subset ofsite.pageslisting those which end in.html.
Posts
site.posts: A reverse chronological list of all Posts.site.related_posts: If the page being processed is a Post, this contains a list of up to ten related Posts. By default, these are the ten most recent posts. For high quality but slow to compute results, run thejekyllcommand with the--lsi(latent semantic indexing) option. Also note GitHub Pages does not support thelsioption when generating sites.
Other
site.static_files: A list of all static files (i.e. files not processed by Jekyll’s converters or the Liquid renderer). Each file has five properties:path,modified_time,name,basenameandextname.site.documents: A list of all the documents in every collection.site.html_files: A subset ofsite.static_fileslisting those which end in.html.
Collections
site.collections: A list of all the collections (including posts).
Data
site.data: A list containing the data loaded from the YAML files located in the_datadirectory.
Time
site.time: The current time (when you run thejekyllcommand).
分类
site.categories.CATEGORY: The list of all Posts in categoryCATEGORY.site.tags.TAG: The list of all Posts with tagTAG.