Closed AndreyAkinshin closed 7 years ago
Folder based references don't work offline on disk, which can be a big problem, but if the doc site is only on-line that can work, I guess. I'm a bit puzzled about the 'it's ugly / oldskool' argument, to be honest. ;) I get that references to html pages directly seem to look 'ugly' with the world of MVC, but is it really that big of a problem? Instead of referring to a folder it's referring to a page, 4 chars difference.
With '#' directives to sub sections into the page the 'index.htm' has to be used anyway or does http://mydomain.com/MySection/#subsection
work? (I honestly don't know)
A lot of modern sites support such url style. For example, the url of this page is https://github.com/FransBouma/DocNet/issues/44
instead of https://github.com/FransBouma/DocNet/issues/44.htm
=).
It would be really nice to have this optional feature for online only sites.
With '#' directives to sub sections into the page the 'index.htm' has to be used anyway or does http://mydomain.com/MySection/#subsection work?
Yes, it works fine. An example: http://aakinshin.net/en/blog/dotnet/stopwatch/#operation-systems (by the way, my blog also uses the same approach: I have the stopwatch
folder with the index.html
file inside instead of the stopwatch.html
file).
Yes, the folder structure is useful for MVC routing, though when I try: http://aakinshin.net/en/blog/dotnet/stopwatch/index.html#operation-systems
it fails, likely due to failed mvc routing as well. Anyway, it's easy to test of course whether it works or not on a non-MVC static site without routing logic. :)
http://aakinshin.net/en/blog/dotnet/stopwatch/index.html#operation-systems works fine to me (it's just a static page from here: https://github.com/AndreyAkinshin/aakinshin.net/blob/gh-pages/en/blog/dotnet/stopwatch/index.html). What kind of problem do you have?
Weird, it works indeed with your url. I must have made a typo somewhere when I tried! Ok, so that's not a problem then! :)
Awesome, thanks!
Hey @FransBouma, any progress with the issue? I want to have this feature in BenchmarkDotNet. =)
No time at the moment, sorry. Perhaps this week but as I won't use this feature in our own docs it won't get a high priority so I have to work on it when I have time outside work.
(edit) It's likely not a lot of work, so I'll see what I can do for you this week.
Well, this is surprisingly more work than one would think. The main issue is that an element's URL is generated by a property without external data. The parameter however is located in the configuration which isn't global, so it can't reach that, ergo it doesn't know if it should create folders instead of files for a markdown file. Making it know it should do that requires either the config to be global / singleton or I have to pass the parameter to the element objects first (which is rather silly too).
Not happy with either situation tbh, so as this is a cosmetic change and not a feature needed for making the tool work, I leave it as it is now. Perhaps I get a different insight later.
@AndreyAkinshin It's implemented in v0.16, which we'll release shortly :)
@FransBouma, awesome! Waiting for v0.16.
v0.16 has been released yesterday :) You can find it at the releases tab :) https://github.com/FransBouma/DocNet/releases
Released
If I create a "MySection.md" file using docnet, it will be transformed to
MySection.htm
with url likehttp://mydomain.com/MySection.htm
which looks ugly and old school. I want to form url in thehttp://mydomain.com/MySection/
format. It should be easy to implement: we just have to generateMySection
folder withindex.htm
file instead ofMySection.md
file. Such feature could have an additional parameter indocnet.json
wich allows enabling of disabling it.