kovetskiy / mark

Sync your markdown files with Confluence pages.
https://samizdat.dev
Apache License 2.0
993 stars 148 forks source link

Linking to blog posts #311

Open jphastings opened 1 year ago

jphastings commented 1 year ago

What happened? I was expecting that local links to blog posts would also work when sync'd to Confluence.

Details of files used A blog entry stored locally at `blog/2023-05-10-my-title.md` with contents: ```markdown # My article ``` It is then sync'd with `mark -f blog/2023-05-10-my-title.md`, and is available at https://example.atlassian.net/wiki/display/my-space/blog/2023/05/10/123456789/My+article. Is referenced from a normal page, stored at `link-page.md`, like this: ```markdown # Let's try a link Here's [a link to a blog post](blog/2023-05-10-my-title.md) which should work. ``` The resulting HTML for `mark -f link-page.md` is: ```html

Here’s a link to a blog post which should work.

```

What did you expect to happen? The a link to a blog post anchor points to an invalid link ("actual" below, instead of "expect" — names chosen to align characters for easier visual diffing)

Expect: https://example.atlassian.net/wiki/display/my-space/blog/2023/05/10/123456789/My+article
Actual: https://example.atlassian.net/wiki/display/my-space/My+article

How can we reproduce the behavior you experienced?

See steps within Details of files used above.

In case this is related to specific markdown, please provide a minimal markdown example here.

Information (please complete the following information):