Skip to content
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

Links to/from subdirs broken depending on use_directory_urls #10

Closed
ghost opened this issue Aug 12, 2020 · 4 comments
Closed

Links to/from subdirs broken depending on use_directory_urls #10

ghost opened this issue Aug 12, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Aug 12, 2020

Version 0.3.3 + MkDocs 1.1.2
Link to sections from subdirs aren't connected depending on the value of use_directory_urls:

huh.md:

# TEST
## One
- [Link 1: to subdir (file)](subdir/huh.md)
- [Link 2: to subdir (section)](subdir/huh.md#one)

subdir/huh.md:

# SUBDIR TEST
# One
- [Link 3: to parent (file)](../huh.md)
- [Link 4: to parent (section)](../huh.md#one)
  • use_directory_urls: true (default): Links 2 & 4 ok, 1 & 3 broken ('The application can’t be opened.')
  • use_directory_urls: false: Links 1, 2 & 3 ok. Link 4 inactive.
@orzih orzih added the bug Something isn't working label Aug 16, 2020
@orzih
Copy link
Owner

orzih commented Aug 16, 2020

Thanks.

I fixed generation methods of links in v0.4.0.
Please try it.

@ghost
Copy link
Author

ghost commented Aug 17, 2020

Thank you. That is indeed fixed but not for all cases of nav hierarchies. For example:

nav:
   - top level:
      - second level:
         - huh.md

(see https://www.mkdocs.org/user-guide/writing-your-docs/#configure-pages-and-navigation)

This fails to build AttributeError: 'Section' object has no attribute 'url'.

I know my workaround is to avoid using dummy levels like this (even though MkDocs say "You may nest sections as deeply as you like") but they are useful for organising large sites or attempting to reproduce a structure built by another doc framework (which is my case).
Thanks.

@orzih
Copy link
Owner

orzih commented Aug 22, 2020

I supports "Session" in v0.5.0.
Please try it.

@ghost
Copy link
Author

ghost commented Aug 26, 2020

Resolved, thank you.

@ghost ghost closed this as completed Aug 26, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant