For a shorter introduction (about half the length) check out "I completely rewrote my personal website using Dev.to as a CMS".
Preface
...
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
Great post James!
Have you thought of migrating to the Next.js Incremental Static Regeneration (ISR) feature? You can reduce the amount of times you have to rebuild the whole site but just allowing each page to regenerate it's static state on the revalidation time you set.
Docs for ISR:
vercel.com/docs/concepts/next.js/i...
Hi Josh, thanks!
Yes in hindsight it would've been a lot easier to use ISR!
I originally decided that I wouldn't use it because that first user that hits it will not see the latest post - in reality, that user is going to be me aha. In any case it was fun to mess around with Vercel's deploy hooks.
The webhook api is no longer working
Aha great! Thanks for bringing this to my attention.
If you see this comment and are using the Dev.to API with Next.js then Incremental Static Regeneration is the way forward. I'll have to migrate my own site to this in the future!
Side note: I'm guessing the PR to remove webhooks was this one: github.com/forem/forem/pull/15827
Hey! This is a great article! I've been trying to achieve the same thing - On the last part, I'd love to see another tutorial series on building a dev.to powered blog from scratch. If this is something you're looking into, and not yet started, would you like to collaborate?
Hi Zak, thanks! I have an almost finished tutorial that has been saved in my drafts for weeks. I just need to find some time to finish it and split it into separate articles (as it's a bit long). I'd love to collaborate but I can't suggest anything other than proofreading and suggesting changes/additions - which would be appreciated but are not very exciting. I can share the draft and repo with you if you DM me?
Hey James - That sounds ace, I don't seem to have the ability to DM you from here, but I have followed you on Twitter, I'll message you on there.
Catch you soon.
Sounds good!
Thanks James! I went to look at your code. One of your "view on github" links is broken:
https://github.com/james-wallis/wallis.dev/blob/master/pages/blog/%5Bslug%5D.ts
It seems the link should point to a
tsx
file instead ofts
works for me:
github.com/james-wallis/wallis.dev...
Great spot, I’ve fixed it! Thanks
I'm thinking about the opposite ... using my website as the only source and have dev.to get the post from there. I'd prefere to own my contents
Yeah, I understand your viewpoint 100%.
Using Dev.to for me is more about being able to take advantage of their tools (editor, publishing workflow, webhooks to redeploy site) without having to configure external tooling such as a CMS. I'll be building a backup system just in case Dev.to decides to close down their servers!
Also, you own the rights to anything you post on Dev.to
They also add that they have the right to store, display, reformat and distribute it.
I understand your point too. I was just intrigued by a diametrically opposite approach
For sure, it will be interesting to see what direction you take
I haven't officialy started yet but I'm planning to use eleventy for my site and create an rss feed to use with the "Publishing to DEV Community from RSS" feature of dev.to to import my post
Nice, I've seen lots of Eleventy but I haven't actually looked into it yet.
My hesitation with using an RSS feed to import my posts is that I don't think they get updated if you make any changes on your website.
Nice! I did the pretty much same but without the need to rebuild on every change.
I'm using incremental static regeneration instead.
dev.to/juliang/using-dev-to-as-cms...
This is awesome!!!
Thank you!