pub struct Writer<'a> {
pub posts_template: &'a Template,
pub index_template: &'a Template,
pub index_base_url: &'a Url,
pub index_output_directory: &'a Path,
pub index_page_size: usize,
pub home_page: &'a Url,
pub static_url: &'a Url,
pub atom_url: &'a Url,
}
Expand description
Responsible for indexing, templating, and writing HTML pages to disk from
Post
sources.
Fields§
§posts_template: &'a Template
The template for post pages.
index_template: &'a Template
The template for index pages.
index_base_url: &'a Url
The base URL for index pages. The main index pages will be located at
{index_base_url}/index.html
, {index_base_url/1.html}
, etc. The tag
index pages will be located at
{index_base_url}/{tag_name}/index.html
, {index_base_url}/ {tag_name}/1.html
, etc.
index_output_directory: &'a Path
The directory in which the index HTML files will be written. The main
index page files will be located at
{index_output_directory}/index.html
,
{index_output_directory}/1.html
, etc. The tag index page files
will be located at {index_output_directory}/{tag_name}/index. html
, {index_output_directory}/{tag_name}/1.html
,
index_page_size: usize
The number of posts per index page.
home_page: &'a Url
The URL for the site’s home page. This is made available to both post and index templates, typically as the destination for the site-header link.
static_url: &'a Url
The URL for the static assets. This is made available to both post and index templates, typically for the theme’s stylesheet.
atom_url: &'a Url
The URL for the atom feed. This is made available to both post and index templates, although typically it is only used by the index templates to link to the atom feed.