This is extremely minor, but the initial `netlify.toml` example confused
me a bit because I didn't realize that it was using a *netlify*
variable; I thought I needed to replace something with a variable from
my own configuration. I made a very minor edit to the docs to clarify.
* Add `index page` section to documentation
The current documentation does not describe how to create a index page.
I initially found this confusing, because I expected an index page to be
a **page** rather than a section. Thus, I tried to access the page
content with `{{ page.content }}` and was very frustrated when I could
not.
This addition clarifies that the index page is **always** a section,
even if it does not have any sub-pages. This should also help people
who intend to use Gutenberg to build stand-alone webpages, rather than
blogs.
Add details to the templates/RSS page to clarify that the `rss.xml`
page is only generated if the `generate_rss = true` variable is set
in the site's `config.toml` page. This information is already present
in other parts of the documentation, but is not present in the RSS page,
which could be confusing.
* Add ignored_content to the Config structure.
* Use the GlobSet crate to parse the glob patterns into a matcher, which
is created once at program initialization. If there are no patterns in
ignored_content, an empty globber is created, which excludes no files.
This is consistent with the existing behaviour of Gutenberg, before
this feature was added.
* Bail if there are any errors in the glob patterns.
* Add a call to the globber in page.rs to actually do the filtering.
* Update documentation.
A note on the Config structure
------------------------------
* I had to remove the PartialEq derive from the Config structure as it
does not work for the GlobSet type. No harm is done, Config does not
need to be PartialEq anyway, since there is no need to sort Configs.
* The implementation follows the pattern of the existing config settings
in that it uses an Option<...>. This would appear unnecessary, in that
an empty vec could be used as the default, but it appears to be needed
by the TOML parsing. A better approach would be to use a separate
SerializableConfig and map to/from a Config struct. This would also
allow the elimination of most, if not all, of the other Options in
the Config structure, but that ought to be another PR.
Separate interface and base_url for serve
You can now have a different base_url and listening interface.
The `gutenberg serve` cmd now accepts `-u`/`--base-url`, but it defaults to `127.0.0.1`.
* Added inital trailing_slash impl
* Added simple test
* Updated docs website to use trailing_slash option
* Updated documentation to reflect new trailing_slash option
* Added combined cachebust and trailing_slash test