FransBouma / DocNet

Your friendly static documentation generator, using markdown files to build the content.
http://fransbouma.github.io/DocNet/
248 stars 36 forks source link

Link fixes #78

Closed GeertvanHorrik closed 7 years ago

GeertvanHorrik commented 7 years ago

This PR solves 3 issues:

  1. RelativeSourceFileName was resolved against the destination instead of source
  2. Relative files inside the .md files now respect the PathSpecification. This means that if a user picks RelativeAsFolder, you can still use relative links to .md files on source, they will now be converted to the correct target url by the markdown processor.
  3. Use custom NavigationContext for search to ensure search works regardless of PathSpecification
FransBouma commented 7 years ago

Nice work!

Use custom NavigationContext for search to ensure search works regardless of PathSpecification

Could you elaborate a bit what this means?

GeertvanHorrik commented 7 years ago

Before this fix, when you use a custom PathSpecification or UrlFormatting, DocNet will generate docnet-search-htm (without extension), thus breaking search.

I tried another fix before (where it would result in docnet-search/index.htm respecting the PathSpecification etc), but then search still wouldn't work (probably because docnet-search.htm is hardcoded somewhere). Therefore I just create a custom NavigationContext just for this file with no url formatting and default path specification.

FransBouma commented 7 years ago

Yeah it's likely in the javascript search file, something that's not updated by the tool so let's leave it as you changed it.

Merged!