We shipped a new feature which allows you to automatically generate and maintain a statically-hosted blog from your DEV posts. This effectively makes DEV a headless CMS for your own hosted sites.
You can already cross-post to DEV from your RSS feed, but this flips the model and presents some fascinating possibilities.
This is a collaboration with Stackbit, who specializes in the generation of static sites. They represent the first Oauth application that hooks into our platform, and we look forward to generalizing this feature for future collaborations.
Stackbit integrates with services like GitHub pages for storing the static files and Netlify for serving. It also allows you to choose between static site generators like Gatsby, Jekyll and Hugo. The whole process is magical.
Here is my generated site: https://royal-lime-c9165.netlify.com π
And here is the repo where all the static content lives, generated automatically with a couple clicks, but editable thereafter to my heart's content...
Stackbit Fresh Theme
This site was generated by www.stackbit.com, v0.2.73.
Running Your Site Locally
-
get "stackbit-api-key" from project menu in Stackbit dashboard
-
run the following command to assign this key to
STACKBIT_API_KEY
environment variable:export STACKBIT_API_KEY={stackbit_netlify_api_key}
-
run the following command to fetch additional site contents from Stackbit if needed:
npx @stackbit/stackbit-pull --stackbit-pull-api-url=https://api.stackbit.com/pull/5d8c91658876b300134349f5
-
Build the site and start the Hugo server with drafts enabled
hugo server -D
-
Browse to http://localhost:1313/
π View a Step-by-step guide on getting started
Why would I want to do this?
That's a good question.
For us, the founders of DEV, we consider it critical that we provide tooling to help folks better manage their data and online presence. We want to be a destination for sharing, teaching, discussing, and generally uplifting one another with our writing, but we don't want to monopolize this game.
There are a lot of reasons to be a part of the DEV ecosystem, but we don't want to make it hard to leave if you ever wanted to. Maintaining a mirror of your DEV content which you can syndicate here and elsewhere is a component of keeping web content from being wholly consumed by centralized monolithic platforms.
I wrote more about these ideas here:
Project Benatar: Fending Off Data Black Holes
Ben Halpern for The DEV Team γ» Jun 17 '19
And for a bit of extra info about our ethos and outlook, here's another relevant post from a few months back...
Medium Was Never Meant to Be a Part of the Developer Ecosystem
Ben Halpern for The DEV Team γ» Jun 3 '19
DEV is about a lot more than just blogging, so these generated sites are necessarily lacking. There's a reason we congregate here, but we firmly believe that a healthy ecosystem is one where personal website still have a place, and migrating platforms is made as simple as possible.
You do not need to be crossposting to a personal site. In fact, there are a lot of good reasons to centralize traffic to a destination like this where you can build up followers and gather reputation. But still, there may come a time where you want your content driven by your personal site.
We are on day one of this functionality. There may be some additional configuration required to get it just right so please view this as an exciting proof of concept, rather than entirely fleshed out feature. And if you encounter edge cases that break the functionality, let us know via an issue...
Forem π±
Welcome to the Forem codebase, the platform that powers dev.to. We are so excited to have you. With your help, we can build out Foremβs usability, scalability, and stability to better serve our communities.
What is Forem?
Forem is open source software for building communities. Communities for your peers, customers, fanbases, families, friends, and any other time and space where people need to come together to be part of a collective See our announcement post for a high-level overview of what Forem is.
dev.to (or just DEV) is hosted by Forem. It is a community of software developers who write articles, take part in discussions, and build their professional profiles. We value supportive and constructive dialogue in the pursuit of great code and career growth for all members. The ecosystem spans from beginner to advanced developers, and all are welcome to find their placeβ¦
If it's on the Stackbit side, we'll pass on the info for you.
The technical details
DEV uses markdown and is generally compatible with other markdown-driven frameworks. As you can see from the above GitHub repo, we do have custom rich content which does not render uniformly like markdown to HTML. Stackbit transforms this rich content into iframe
, whereas we display this stuff inline via plain old HTML.
Stackbit acts as convenient and powerful piping, but has minimal lock-in because it integrates with other services and generates standard open source projects. This gives you a lot of additional freedom to break from the ecosystem.
This is an area where centralization of rendering control has efficiencies which are hard to replicate with this kind of thing, but it's a small detail compared with the overall positive benefits of this optionality for everyone.
It is possible that the implementation of this could change over time, depending on what ideas we all come up with together.
Going forward
In the future...
- The functionality and config of this feature and similar ones will evolve to be more and more useful over time.
- More apps will be allowed to build on our Oauth functionality. Feel free to contribute to the generalization of this feature via our repo.
- We will launch more and more functionality devoted to transparency, data portability, and decentralization. We have a lot of big things coming.
If you want to get involved in any of our open source plans, Hacktoberfest is going to be the best time to do it...
Hacktoberfest Starts in Six Days ππ
Ben Halpern for The DEV Team γ» Sep 25 '19
Register for Hacktoberfest. We'll have lots of new guiding contribution material ready for the beginning of the celebration on October 1st.
In case you skimmed past it above, here are the instructions to get started with Stackbit.
Happy coding!
Latest comments (75)
sorry to bother you @ben @jess
but is the DEV-stackbit connection not available anymore?
I tried to update my website which was powered by it
but I cannot npm install or npm the JS packages anymore
Everything is two years old which means 80 years old in the JS ecosystem.
So I went to dev.to/connecting-with-stackbit but this link is a HTTP 404
Then I went to app.stackbit.com/create?ref=devto but this doesn't work anymore either
Any resources I could use?
dev.to/devteam/heads-up-stackbit-i...
Oops, looks like it is removed
awesome, thanks for the information!
and easily make it accessible in the blockchain...
I used stackbit to generate my site . I wish to edit some things on it. How do I edit it? thanks in advance. :)
Is this still available?
I wanted to poke around with this, but I don't see DEV as an option in the CMS section π’
I just did this. Dead easy. Love that it has so many options for site generator. Not too familiar with Gatesby, but Hugo is right up my street.
One problem. The emoji that are supported here such as π¦Ύ, aren't rendering on my site correctly, like here: daveparr.info/posts/posting-from-r...
Is there anything I can do about that?
I signed up on here a few minutes ago because I just wanted to quickly comment on another article. And now I'm sitting here and discover what a wonderful philosophy is behind dev.to.
My reluctance with publishing on Medium had always been that they basically own your content and it will go down together with them. However, if you want others to find your content, it definitely helps to use a platform instead of a personal blog.
Dev.to seems to be a healthy middle-ground between discoverability and data-ownership. Nice. ππ»
voted and this a great idea already adopted at osde8info-devto-stackbit-755f2.net...
@ben is this a one time data migration, or is something pushing/pulling the content into the repo?
@ben - Are there plans to allow someone to use the content under an Organization rather than under one author to build out a Stackbit site?
+1
Has anyone had a problem getting the "Connect to DEV.to" connector to pop up on Stackbit?
Great one!
Wow this really sounds interesting. Still trying to wrap my head around it and the possibilities!
I used Stackbit to migrate my Medium blog to a Gatsby site. It was fairly simple and painless, which is not what I expected of migrating off Medium π . Especially when Iβd been posting to the blog on Medium once a week for between 1 and 2 years. Long story short, Stackbit is great and Iβm excited to see this collab! πβ¨β¨
This is a real great news for the Dev community.π€
It is completely impossible to say the opposite.
I already had the chance to exchange with you about this subject in this blog post.
Why you should not publish content on Dev.to ?
Antoine Caron γ» Jul 19 γ» 3 min read
For me, it is still the first step to make Dev.to the blogging platform we all dream of.
Now we can easily extract our content from Dev.to but we can't detach ourselves from a service as centralized as AWS.
Netlify, Stackbits are great tools but in my idea, I'd rather be able to host my own Dev.to "at home" without tracking and without advertising.
Is it still something you have in mind ?
generated Home - Stackbit Ampersand Theme, but trying to figure out how to edit the This is about excerpt. Help appreciated!