Thanks to Dev.to, us developers have a niche platform to write without the need to start our own blog. This is awesome, but you built a portfolio s...
For further actions, you may consider blocking this person and/or reporting abuse
For syntax highlighting you could feed the raw markdown into the wc-markdown web component.
github.com/vanillawc/wc-markdown
It has markdown parsing (Marked) and syntax highlighting (PrismJS) built-in.
I'm going to try hosting this from a S3 Bucket.
This is huge. Thank you! May just be the solution to some styling hacks here as well. :)
In theory, it should work. I haven't actually tried integraring the web component into Vue yet. When you import, use the
dist/
bundle.I've been looking for a setup like this for my own blog. So, I'll be trying to do the same.
Except, I'm going to try hosting it on AWS. With the website code on S3, the Dev.to requests proxied through API Gateway, and everything sitting behind a Cloudfront distribution.
That should allow HTTPS, cache all requests (incl the ones proxied to Dev.to) for 24 hours, and be dirt cheap to host.
BTW, the component uses lightDOM. Meaning you can style it globally.
Styles can be defined relative to the component. Once parsed, it'll contain the Markdown rendered as HTML. So, you can define styles like this:
Thanks for your nice article. I also moved my blog site from wordpress to vuejs and netlify. I also wrote an article crediting you here
Moved My Blog Website From WordPress To Dev.to With VueJS
Sulman Baig ・ Jul 22 ・ 3 min read
It would be great for me to have something like this but using a lightweight framework like Stimulus or Trimmings
Great work :)
I'm preparing my blog with Nuxt for a while. This will help me. Thanks.
Fantastic! Let me know if you have any questions or figure out some better ways to display the article contents. The biggest challenge with this approach so far is style overrides & syntax highlighting.
Of course :) Maybe I will permanently move my blog to Dev.
Dude! This looks soo cool! I love the gif banner on your website.
Stackbit is also an alternative for publishing from dev.to, that takes away bit of the complexity of the setup.
Nice read! 🔥
The code typer animation on my site is actually a demonstration of of
setInterval
with Prism.It's a bit messy but you can check out the code here.
Thanks a lot! I'll definitely look into Stackbit as well.
Awesome
Cool!
Could you get document API dev.to for me?
Thanks!