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.
Since we are using a builtin template, we can be assured to have the
target file in place. Middleware renamed since it is bound directly to
the concept of handling 404s.
Users can now place custom error pages in static/error/<error_code>.html
e.g. static/error/404.html
If no custom page is found, a default plaintext describing the error is served.
I filed actix/actix-web#261 as per the maintaner's request while
working on #310.
Having looked at the issue this morning, it appeared there was an
implementation to convert `io::Result` into a `Responder`, which kicked
in when I tried to access the `respond_to()` method without getting the
inner type from that first result before hand.
Conversion is by way of the `Display` trait impl since the actix errors
all seem to be more concerned with converting to/from http responses
rather than standard errors.
This implementation seems to match the behavior of the previous iron
server.
Static files are rendered as-is, and when a directory is requested, we
attempt to render a `index.html` found inside, or 404 if it's not
present.
The actix docs mention using channels to send a message to the server to
shut it down gracefully while running in another thread (as we're doing
here), but it seems like there would have to be some reorganization in
order to manage this effectively, perhaps holding the channel sender inside
`main.rs` so we can push a message through to the server when the call
to `cmd::serve()` finally returns.
For the time being, I left things without any careful attempts to
cleanup the server thread. This more or less matches the old iron
implementation as far as I can see.
The static file handling in actix is _just_ a little off from what we'd
want.
I left some comments in the source regarding why we can't just use their hook
for directory index redirection.