-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: urls without ".htm" #44
Comments
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 |
A lot of modern sites support such url style. For example, the url of this page is It would be really nice to have this optional feature for online only sites.
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 |
Yes, the folder structure is useful for MVC routing, though when I try: |
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 in
docnet.json
wich allows enabling of disabling it.The text was updated successfully, but these errors were encountered: