You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -87,8 +98,8 @@ defmodule Tableau.PostExtension do
87
98
88
99
* `:id` - An Elixir module to be used when compiling the backing `Tableau.Page`
89
100
* `:title` - The title of the post
90
-
* `:permalink` - The permalink of the post. `:title` will be replaced with the posts title and non alphanumeric characters removed
91
-
* `:slug` - A URL slug of the post. Only used if `:permalink` is unset
101
+
* `:permalink` - The permalink of the post. `:title` will be replaced with the posts title and non alphanumeric characters removed. Optional.
102
+
* `:slug` - A URL slug of the post. Only used if `:permalink` is unset. `:title` will be replaced with the posts title. Optional
92
103
* `:date` - An Elixir `NaiveDateTime`, often presented as a `sigil_N`
93
104
* `:layout` - A Tableau layout module.
94
105
@@ -103,6 +114,16 @@ defmodule Tableau.PostExtension do
103
114
layout: "ElixirTools.PostLayout"
104
115
---
105
116
```
117
+
118
+
## URL generation
119
+
120
+
If a `:permalink` is specified in the front matter, whatever is there _will_ be the post's permalink, regardless of presence of `:slug`
121
+
122
+
If `:slug` is specified, the globally configured permalink will be used, with the slug provided as a replacement string. See `Tableau.PostExtension.Config` for details.
123
+
124
+
If neither `:permalink` nor `:slug` is specified, the files name will be used as the slug.
125
+
126
+
In all cases, permalinks are stripped of non-alphanumeric characters.
0 commit comments