markup icon indicating copy to clipboard operation
markup copied to clipboard

Include file-content as part of markdown.

Open kanuku opened this issue 12 years ago • 139 comments

It would be great if we could include certain lines from another file to be showed inside a mardown file.

For example something like: {5:12}(code/example.java)

Would result in including the specified java file, lines 5 to 12

05. 
06. public static void main(String[] args) {
07.
08.   system.out.println("Hello World!");
09.
10.
11.
12. }

kanuku avatar Aug 16 '14 09:08 kanuku

+1

DevOpsCraftsman avatar Aug 29 '17 20:08 DevOpsCraftsman

+1

UweZiegenhagen avatar Aug 30 '17 17:08 UweZiegenhagen

+1

Foxh0und avatar Aug 31 '17 12:08 Foxh0und

+1

adamday2 avatar Sep 11 '17 18:09 adamday2

+1

tmlayton avatar Sep 13 '17 18:09 tmlayton

+1

MJCD avatar Sep 17 '17 09:09 MJCD

+1

winf-hsos avatar Sep 21 '17 09:09 winf-hsos

+1

jkiddo-dxc avatar Sep 29 '17 09:09 jkiddo-dxc

+1

jloveric avatar Sep 29 '17 15:09 jloveric

For what it's worth I was giving this some consideration the other day and I think the only realistic way to implement such a thing is probably to have the resources be fetched as CLIENT SIDE includes.

The server would not pre-parse these 'extensions'. A page could opt into resolving them if it was in their best interest as a 'feature' with a small client side javascript.

For security this could be limited either strictly to same origins or with CORS/CSP outside of the libraries control.

MJCD avatar Sep 30 '17 08:09 MJCD

+1

Patola avatar Oct 02 '17 11:10 Patola

+1

iilyak avatar Oct 24 '17 18:10 iilyak

I'd love any feedback on my proposal for a client-side extensions lib that would provide this

MJCD avatar Oct 28 '17 13:10 MJCD

I have a simple use case. I have a file version.txt which contains the current version of my project. I want to be able to pull that version number into my markdown eg. so I can reference a particular version of my code in GitHub by its label in my README.md.

mcarans avatar Oct 31 '17 07:10 mcarans

Thanks for your feedback - every bit will hopefully push this agenda along a bit!

MJCD avatar Oct 31 '17 15:10 MJCD

+1 I would love to pull in my .env.example file

SeanCannon avatar Nov 08 '17 20:11 SeanCannon

+1

proudcommerce avatar Nov 17 '17 14:11 proudcommerce

+1

pgallir avatar Nov 24 '17 10:11 pgallir

+1

teddyrendahl avatar Dec 02 '17 19:12 teddyrendahl

+1

gabriel-v avatar Dec 04 '17 15:12 gabriel-v