Skip to content
This repository

Documentation for extensionless URLs #5

Open
wants to merge 1 commit into from

1 participant

Alan Hogan
Alan Hogan

Just so others don’t file needless issues or have to search the source :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

May 15, 2011
Alan Hogan Document how to avoid generating extensions f4021f3
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 23 additions and 0 deletions. Show diff stats Hide diff stats

  1. 23  content/config.html
23  content/config.html
@@ -73,6 +73,29 @@
73 73
     path from the root of the site source or an absolute path. Note that
74 74
     this can also be overridden in the [command line][commandline] using
75 75
     the `-d` option.
  76
+    
  77
+### Extensionless URLs
  78
+
  79
+To avoid generating links that end in `.html`, add this line under `plugins` in
  80
+the config file, `site.yaml`:
  81
+
  82
+        - hyde.ext.plugins.urls.UrlCleanerPlugin
  83
+
  84
+And append something like this to the end of `site.yaml`
  85
+(the first line should not be indented):
  86
+
  87
+    urlcleaner:
  88
+        index_file_names:
  89
+            # Identifies the files that represents a directory listing.
  90
+            # These file names are automatically stripped away when
  91
+            # the content_url function is called.
  92
+            - index.html
  93
+        strip_extensions:
  94
+            # The following extensions are automatically removed when
  95
+            # generating the urls using content_url function.
  96
+            - html
  97
+        # This option will append a slash to the end of directory paths if true
  98
+        append_slash: false
76 99
 
77 100
 ## Plugins & templates
78 101
 
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.