md2cf icon indicating copy to clipboard operation
md2cf copied to clipboard

Associate Markdown files and page ID's

Open bhrutledge opened this issue 2 years ago • 9 comments

Related to #20.

To make it easier to update pages and change titles, I think it'd be helpful to save the relationship of a Markdown file and its page ID (preferably the whole URL) after creating it. I've seen this done with a separate config file, front matter, and comments. My preference would be to append a comment to the end of the file, e.g.:

# Page title

Page content

<!-- https://ORG.atlassian.net/wiki/spaces/~SPACE_ID/pages/PAGE_ID/Page+title -->

This could then be parsed for the host, space, and page ID.

bhrutledge avatar May 10 '22 00:05 bhrutledge

Hey, just letting you know that I'm going through a move, so I won't have time for the next little while. I haven't forgotten about this.

iamjackg avatar Jun 06 '22 18:06 iamjackg

This is published in the latest version :)

iamjackg avatar Jul 27 '22 12:07 iamjackg

@iamjackg Is it? I don't see it listed in the release notes, and I don't recall opening a PR for it.

bhrutledge avatar Jul 27 '22 13:07 bhrutledge

Oh, no, it's not -- sorry, I completely crossed the streams here.

iamjackg avatar Jul 27 '22 15:07 iamjackg

any updates?

PullDakar avatar Oct 26 '22 10:10 PullDakar

Would you be okay with the comment starting with a unique string like md2cf:? I need a way to avoid clobbering any existing comments if a page gets updated, moved, renamed, etc.

Also, is that an actual URL format used by Atlassian-hosted instances, or just something you made up to encode that information in the comment?

iamjackg avatar Nov 10 '22 13:11 iamjackg

@PullDakar, @bhrutledge if you're still interested in this feature, please let me know your thoughts.

iamjackg avatar Dec 03 '22 20:12 iamjackg

Thanks for the nudge!

Would you be okay with the comment starting with a unique string like md2cf:?

Yep!

Also, is that an actual URL format used by Atlassian-hosted instances, or just something you made up to encode that information in the comment?

That's the format that I've seen on our Atlassian-hosted instance.

bhrutledge avatar Dec 03 '22 20:12 bhrutledge

Sorry, I missed your response -- I've been busy working on a huge rewrite and it's currently in alpha. If all goes well I'll try to sneak this in before the final version :)

iamjackg avatar Feb 02 '23 14:02 iamjackg