twostraws / Ignite

A static site generator for Swift developers.
MIT License
1.71k stars 94 forks source link

Not so much an Issue; more of a warning about the impact of Build folder names on links to other pages. #117

Open cpah opened 1 month ago

cpah commented 1 month ago

When the Build folder is generated by Xcode, the case of the folder names that are created from Sources/Pages files is always set to lower case, whatever the name of the Sources/Pages file's StaticPage or ContactPage struct.

For example,

struct Support: StaticPage {
    var title = "Support"
    ...
}

produces a Build subfolder called support. If you link to your support page with [Support](/Support), the link may not work. From my experimentation, the link will work on macOS browsers but not on iOS browsers. The link, as you would expect, needs to be changed to match the Build subfolder, i.e. [Support](/support)

Furthermore,

struct RegularServices: StaticPage {
    var title = "RegularServices"
    ...
}

produces a Build subfolder called regular-services. Any capitalisation of StaticPage or ContactPage struct names results in different Build subfolder names. I suggest it would be useful to include a warning note, in any future guidance, for users to check the contents of the Build folder and its subfolder names when creating internal links to Sources/Pages in within Ignite websites.

PS. There is a similar issue with tags. A macOS tag produces a mac-o-s subfolder in Build/tags subfolder.