Skip to content

Commit

Permalink
Do not override existing index pages (#91)
Browse files Browse the repository at this point in the history
* Don't override index.html pages with generated index pages

* Tidy index path logic

* Upgrade jest so it runs on latest version of Node 18

* Add note about index file generation to README
  • Loading branch information
paulbrimicombe authored Jan 19, 2024
1 parent 7d6cbb0 commit 23f3569
Show file tree
Hide file tree
Showing 6 changed files with 1,945 additions and 1,392 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ through because it is not markdown or asciidoc e.g. images

## Things to Consider

### Index file generation

Morty will automatically generate an `index.html` file for any directory that
contains markdown or asciidoc files (or has descendants that contain these
files). This file contains links to any documentation files or subdirectories
the directory contains. The generation will be skipped for any directory that
already contains an `index.md`, `index.asciidoc`, `index.adoc` or `index.asc` file.

### File & Directory Ordering

These are sorted lexically (0-9 < a-z>).
Expand Down
5 changes: 4 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = {
'snapshotSerializers': ['jest-serializer-html']
'snapshotSerializers': ['jest-serializer-html'],
'snapshotFormat': {
'printBasicPrototype': true
}
}
Loading

0 comments on commit 23f3569

Please sign in to comment.