Skip to content

Documentation for extensionless URLs #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions content/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,29 @@
path from the root of the site source or an absolute path. Note that
this can also be overridden in the [command line][commandline] using
the `-d` option.

### Extensionless URLs

To avoid generating links that end in `.html`, add this line under `plugins` in
the config file, `site.yaml`:

- hyde.ext.plugins.urls.UrlCleanerPlugin

And append something like this to the end of `site.yaml`
(the first line should not be indented):

urlcleaner:
index_file_names:
# Identifies the files that represents a directory listing.
# These file names are automatically stripped away when
# the content_url function is called.
- index.html
strip_extensions:
# The following extensions are automatically removed when
# generating the urls using content_url function.
- html
# This option will append a slash to the end of directory paths if true
append_slash: false

## Plugins & templates

Expand Down