SaraVieira / fiddly

Create beautiful and simple HTML pages from your Readme.md files
https://fiddly.netlify.com
MIT License
1.01k stars 39 forks source link

Does not support changing additional file names #25

Open chimon2000 opened 5 years ago

chimon2000 commented 5 years ago

Summary

When using a filename with multiple hyphenated words, they are not split. Take the following example:

image

In this case, the 2nd page uses snake case and the 3rd page uses hyphens.

Solution

One solution that piggybacks from vuepress is to allow additionalFiles to accept string|string[]. If an array is used, the first value is the file and the second value is the title. Take the following as an example:

{
  "additionalFiles": [
    ["./docs/core_concepts.md", "Core Concepts"],
    ["./docs/another-page.md", "Another Page"],
    "thirdpage.md"
  ]
}

The first two pages have a different title from their file path. The last page has the same title.