Skip to content

Commit 11aed29

Browse files
authored
📚 DOCS: Mention hash filter in README (#7)
1 parent 50d7f9f commit 11aed29

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,16 @@ dist/
279279
### Jinja Templates
280280

281281
Files can be created from Jinja templates.
282-
These are created after the SCSS and JS files are compiled, and allow for a special `compiled_name` filter,
283-
which converts ab input file path to the compiled file name:
282+
These are created after the SCSS and JS files are compiled.
283+
In addition, they may be combined with two Jinja filters designed for this tool:
284+
285+
- `compiled_name` will convert an input file path to the compiled file name.
286+
- `hash` will return the hash for a filename that can be inserted wherever you wish.
284287

285288
`src/file.j2`:
286289
```jinja
287290
{{ "src/file.scss" | compiled_name }}
291+
{{ "src/file.scss" | compiled_name }}?digest={{ "src/file.scss" | hash }}
288292
{{ var1 }}
289293
```
290294

@@ -307,6 +311,7 @@ $ web-compile
307311
`dist/file.txt`:
308312
```
309313
file.beabd761a3703567b4ce06c9a6adde55.css
314+
file.beabd761a3703567b4ce06c9a6adde55.css?digest=beabd761a3703567b4ce06c9a6adde55
310315
other
311316
```
312317

0 commit comments

Comments
 (0)