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

FR: post several .md files into one Confluence page #521

Open
roseaysina opened this issue Oct 21, 2024 · 3 comments
Open

FR: post several .md files into one Confluence page #521

roseaysina opened this issue Oct 21, 2024 · 3 comments

Comments

@roseaysina
Copy link

Hola!

Our team are migrating from Foliant to Mark. And we faced problem that it's not possible to post several .md files into one Confluence page.

It's very useful when you have not so big documentation that is separated so that 1 section == 1 .md file. And it's not convenient to publish them in separate pages as they are too small to be a single page.

Maybe mark has this feature already? I couldn't find anything in the documentation.

Thanks!

@mrueg
Copy link
Collaborator

mrueg commented Oct 22, 2024

I think the easiest way to accomplish this is using a bash script that merges the single docs together in the order you want.

If mark should do this, how would it be able to identify all the snippets?

@roseaysina
Copy link
Author

In Foliant user must specify desired .md files based on some order. Here there can be such an option I guess. It's especially useful when you want to specify order (for example documentation or instruction).

Thanks for idea with merging! Definitely worth trying.

@YuriyAM
Copy link
Contributor

YuriyAM commented Nov 7, 2024

My team had a different use case: we wanted to generate part of our documentation and then include it in other pages. We name these auto-generated pages as *.GENERATED.md , and our publishing script excludes any page with this name to prevent them from being published directly.

I’ve had success using the Include: header to accomplish combining multiple markdown files into a single Confluence page.

Assume you have the following directory structure:

Folder
├───Page-section-1.md
├───Page-section-2.md
└───Page.md

Here, Page.md is the main file. To include other files, you can add the following lines to Page.md:

<!-- Include: Page-section-1.md -->
<!-- Include: Page-section-2.md -->

Then, just run mark on Page.md to generate the complete document with all included sections.

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

3 participants