question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How would I go about making an `.svx` blog?

See original GitHub issue

Hi MDsveX! XD

I recently cloned the mdsvex starter and it’s quite nice 😃 However, I noticed that the blog portion of the MDSveX starter is still a single file of js objects, rather than a folder of separate .svx files for each post, so I was wondering how one might go about altering the starter to include an MDSveX powered .svx blog 😃

Would it be similar to some of the sapper/markdown tutorials floating around or would it require something completely different in regards to parsing the .svx files and spitting them out as valid svelte/html?

Would love to see this added/implemented/instructed in the near future XD

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

20reactions
pngwncommented, Aug 19, 2020

I would like to create some guides, templates, tutorials on this in the future to go through a few ways of achieving it. I doubt I’ll get this done anytime soon but I would like to get a half decent blog starter figured out in the short term as a reference. I’ll see if I can dedicate some time to this soon.

9reactions
sharu725commented, May 30, 2021

Hi MDsveX! XD

I recently cloned the mdsvex starter and it’s quite nice 😃 However, I noticed that the blog portion of the MDSveX starter is still a single file of js objects, rather than a folder of separate .svx files for each post, so I was wondering how one might go about altering the starter to include an MDSveX powered .svx blog 😃

Would it be similar to some of the sapper/markdown tutorials floating around or would it require something completely different in regards to parsing the .svx files and spitting them out as valid svelte/html?

Would love to see this added/implemented/instructed in the near future XD

That’s exactly what I have done here - https://github.com/sharu725/hagura-sveltekit. It is live here - https://hagura-sveltekit.netlify.app/

The main problem was getting all the posts in an index file(homepage) Vite has a nice utility called import.meta.glob() which can be used like this

const posts = import.meta.glob("./blog/*.{md,svx}")

This will fetch all the frontmatter in .md and .svx files.

Here is how I have done it - https://github.com/sharu725/hagura-sveltekit/blob/main/src/routes/index.svelte

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Make The Subaru SVX The Car It Deserves To Be
Welcome to Fatal Flaw, where I choose a cool car that is made significantly less desirable by one major, glaring fault — and...
Read more >
A Year in Review with SVX: 2021 - Medium
Our virtual holiday and strategy meeting this year! 2021 was a wild roller coaster ride. Businesses and families faced continued COVID-19 ...
Read more >
FAQ | SVX - Invest for Impact
How Does the SVX Work? SVX uses crowdfunding and direct placement to support capital raising by impact ventures and funds. Investors and issuers...
Read more >
Let's learn SvelteKit by building a static Markdown blog from ...
blog /+page.svelte --> <h1>Blog</h1> <p>My blog posts will go here ... Inside of src/routes , make a new file named +layout.svelte .
Read more >
How SVX is scaling social innovation across borders
At the recent Social Finance Forum, the governments of Ontario and ... SVX with other partners, they will collaborate with us to make...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found