ozum / concat-md Goto Github PK
View Code? Open in Web Editor NEWCLI and API to concatenate markdown files and modify as necessary.
License: MIT License
CLI and API to concatenate markdown files and modify as necessary.
License: MIT License
The ignore option is passing the "ignore" option to globby. But globby doesn't have such option.
concat-md uses an outdated version of doctoc, which uses a vulnerable version of underscore
Critical Arbitrary Code Execution in underscore
Package underscore
Patched in >=1.12.1
Dependency of concat-md [dev]
Path concat-md > doctoc > underscore
More info GHSA-cf4h-3jhx-xvhq
Hello
I'm probably doing something wrong: I've a folder called userguide
with one readme.md and one subfolder by chapter. Each folder has his own index.md.
So, I've four .md files
└─ doc
└─ userguide
├─ readme.md
├─ Chapter 1
│ ├─ index.md
├─ Chapter 2
│ ├─ index.md
├─ Chapter 3
│ ├─ index.md
└─ concat.bat
In my parent doc
folde, I've a concat.bat
script with this command : concat-md --decrease-title-levels userguide
So, my understanding was: the four markdown files will be taken and, with respect to the folder's hierarchy, level of title will be decreased (H1 will become H2).
But no, it doesn't work like that.
I get this:
<a name="readmemd"></a>
# My amazing doc (readme.md)
<a name="chapter-1indexmd"></a>
# Chapter 1 (chapter1/readme.md)
<a name="chapter-2indexmd"></a>
# Chapter 2 (chapter2/readme.md)
## Chapter 2.1
<a name="chapter-3indexmd"></a>
# Chapter 3 (chapter3/readme.md)
## Chapter 3.1
## Chapter 3.2
My expectation was to get ## Chapter 1
i.e. the H1 in chapter 1/index.md
becomes a H2.
Does --decrease-title-levels
shouldn't follow how deep the tree-structure is ?
Thanks!
Is it possible to add this feature where we can only have one title in the readme
I am using concat-md together with typedoc, which is exactly the same way how the documentation in this repo is generated. It his quite useful. Thank you!
NPM complains about some outdated dependencies of concat-md. I can see there are some PRs here not being handled for a long time.
So just wonder, is this repo still be maintained? Any chance to get dependencies upgraded?
Is there a wrap to let’s wrap each page with a <div>
or something similar?
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.