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

Feature request: fix links #1

Closed
Vinnl opened this issue Jul 14, 2019 · 3 comments
Closed

Feature request: fix links #1

Vinnl opened this issue Jul 14, 2019 · 3 comments

Comments

@Vinnl
Copy link

Vinnl commented Jul 14, 2019

This looks good @ozum! I haven't tried it yet, but since it isn't listed I presume this isn't implemented yet: is it possible to fix relative links? For example, when one markdown file refers to another, or even to a heading in another, those could be changed to refer to the relevant heading in the concatenated file.

So e.g.

README.md

# Read me

Here's a cool reference to [more info](more-info.md#the-info).

more-info.md

# More info
Hi there, want more info?

## The info

Here's more info.

This could result in:

concatenated.md

# Read me

Here's a cool reference to [more info](#the-info).

# More info

Hi there, want more info?

## The info

Here's more info.

(And another request: perhaps the README of this project could also give a small example of two input files and the resulting concatenated file.)

Thanks for picking this up!

@ozum
Copy link
Owner

ozum commented Jul 14, 2019

@Vinnl it is not implemented, but good idea, I will try to implement it.

About example. There is a very simple example at the end of README. In case you missed that, please have a look. If you still think that example is not clear, please let me know, so that I can improve it.

@Vinnl
Copy link
Author

Vinnl commented Jul 14, 2019

@ozum What can I say - I'm blind, apparently. I guess I was thrown off by the heading for README.md appearing to be larger than those for the individual files due to its capitalisation, but that's indeed exactly what I was looking for :)

@ozum
Copy link
Owner

ozum commented Jul 15, 2019

@ozum What can I say - I'm blind, apparently.

No worries, happens to me lots of the time :)

@Vinnl, I released a new version (0.2.0), which converts relative links.

  • If --file-name-as-title is used, links are converted to point to generated file title,
  • Otherwise <a name="file-path-slug"></a> added to start position of each file and converted links point to this.
  • # Hash tags are converted to point to generated file. (If two different links with same name exists, unfortunately first one wins. I have some ideas but they are not so easy to implement)

Feedbacks are welcome.

@ozum ozum closed this as completed Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants