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

Allow smart linking for multi-source projects #39

Open
jmatsushita opened this issue Apr 17, 2016 · 1 comment
Open

Allow smart linking for multi-source projects #39

jmatsushita opened this issue Apr 17, 2016 · 1 comment

Comments

@jmatsushita
Copy link
Member

jmatsushita commented Apr 17, 2016

When a project contains several subrepos (like the contentascode spike developed for the open integrity project) it would be good to allow linking across parent repo and subrepo in a way that is simple for instance

  • [Link in the parent repo to a sub folder in the parent repo](/subfolder/file.md)
  • [Link in the parent repo to a subrepo](/subrepo_a/folder/file.md) -> We need to manage subfolder/subrepo name collisions (via the pre-commit validation run? Implement link checker and other server side validation on Travis #11)
  • [Link from a subrepo to the parent repo](/subfolder/file.md)
  • [Link from a subrepo to another subrepo](/subrepo_b/file.md)

With the baseurl problem (when sites are served from scheme://host/folder/) this needs some kind of pre-processing.

@jmatsushita
Copy link
Member Author

There's also the relative linking question when permalinks are activated such that with a file structure

.
├── in_root.md
└── folder
    ├── in_folder.md
    └── also_in_folder.md

Without permalinks the links written like this work (which is the most intuitive)

in_root.md

[Link to in folder](folder/in_folder.md)

folder/in_folder.md

[Link to root](../in_root.md)
[Link to also in folder](also_in_folder.md)

However when activating permalinks because the generated tree creates an additional level of folders:

.
├── in_root
│   └── index.md
└── folder
    ├── in_folder
    │   └── index.md
    └── also_in_folder
        └── index.md

Therefore the links need to be modified in this way:

in_root.md

[Link to in folder](folder/in_folder)

folder/in_folder.md

[Link to root](../../in_root)
[Link to also in folder](../also_in_folder)

The ability to link without the extension is great but the complexity of the linking is not. So the smart linking should also be aware of whether permalinks are activated or not, and allow to use the following syntax and transform it as needed:

in_root.md

[Link to in folder](folder/in_folder)

folder/in_folder.md

[Link to root](../in_root)
[Link to also in folder](also_in_folder)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant