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

Can Eleventy support code snippet import in Markdown? #1315

Open
nweldev opened this issue Jul 14, 2020 · 1 comment
Open

Can Eleventy support code snippet import in Markdown? #1315

nweldev opened this issue Jul 14, 2020 · 1 comment
Labels
education issue-bankruptcy Declaring bankruptcy on some old issues that never got a reply.

Comments

@nweldev
Copy link

nweldev commented Jul 14, 2020

Question

In markdown files, I extensively use the Vuepress "import code snippet" syntax, which allows importing some delimited part of a code file as a code snippet (see vuejs/vuepress#2225).

>>> @/directory/myfile.js#region

FYI, I also made a Pandoc plugin for that, pandoc-import-code.

Would it be possible for me to write a similar plugin for eleventy?

Context

I'm looking to migrate one of my websites, fullweb.dev (sources here), from Vuepress to a more "flexible" approach.

Meaning:

A. using a static site generator (like eleventy) only for the actual static parts, written in markdown

Some of these markdown files are also used to generate some other formats (like .odt) via Pandoc.

So, I could simply use pandoc -F pandoc-import-code src/my-source-file.md -o dist/my-fragment.html to generate the HTML fragments, and then write the whole website myself, but I would like to give a try a more complete solution allowing me to do everything Vuepress already does (e.g. "dev server watch" mode and routing), and more. Inspired by open-wc/open-wc#1594, I would like to give a try to Eleventy, even if I would like to avoid njk files as much as possible.

B. using VanillaJS/lit-html for the dynamic parts

For example, /inventory/:name.

Right now, It's a Vue SFC and requires some tricks for routing.

I'm new to Eleventy, so I welcome any comments and suggestions.

@zachleat
Copy link
Member

Unfortunately this issue slipped under the radar—I’m finally circling back through some of the old issues on the tracker but I’d love a confirmation that this old one is still relevant before I start debugging! If I don’t hear anything in the next two weeks, I’ll likely close it as stale—sorry (and thank you!)

@zachleat zachleat added the issue-bankruptcy Declaring bankruptcy on some old issues that never got a reply. label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
education issue-bankruptcy Declaring bankruptcy on some old issues that never got a reply.
Projects
None yet
Development

No branches or pull requests

2 participants