惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
D
Docker
Jina AI
Jina AI
The GitHub Blog
The GitHub Blog
博客园 - 聂微东
B
Blog RSS Feed
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
博客园 - 叶小钗
爱范儿
爱范儿
D
DataBreaches.Net
Hugging Face - Blog
Hugging Face - Blog
IT之家
IT之家
Recent Announcements
Recent Announcements
U
Unit 42
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
量子位
Stack Overflow Blog
Stack Overflow Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog

Railway Blog

Where Railway is, and where it's going (Summer 2026) PaaS vs IaaS vs SaaS: What Each Means and Who Should Pick What in 2026 The Best Continuous Deployment Tools in 2026 The Best PaaS for Multi-Region Deployments in 2026 The Best Platforms for Monorepo Deployments in 2026 Compliance Isn't a Feature, It's a Posture What is BYOC (Bring Your Own Cloud)? A Developer's Guide for 2026 The Best Managed Kubernetes Hosting in 2026 The Best Container Registries in 2026 The Vanilla Cloud Tax: What Rolling Your Own on AWS Actually Costs What is a PaaS? A Developer's Guide for 2026 The Best Cloud Observability and Logging Tools in 2026 The Best PostgreSQL Hosting for Developers in 2026 The Best Multi-Region Hosting Platforms in 2026 The Best Platforms to Deploy AI Apps in 2026 (Not the Models, the Apps Around Them) Incident Report: May 19, 2026- GCP Account Suspension Counting to 3 with a new builder processing 50M+ monthly builds Railway iOS preview now available via TestFlight Kill your onboarding: selling to 10,000+ new users a day Your AI wants to nuke your database. Guardrails fix that. Better Rails for Agents: A New Remote MCP and Railway Agent in the CLI Moving Railway's Frontend Off Next.js One command deploys, there's a Stripe APP for that From registrar to deployed: buying a domain inside Railway A letter to open source builders who deserve more Networking is a black box, we used eBPF to open it Heroku Walked So Railway Can Run Security Features Your Security Team Will Love Railway Runs Open Source, Now We're Funding It Railway raises $100M Series B to unburden the builders
Use Notion as a CMS for your NextJS blog
Faraz Patankar · 2021-04-30 · via Railway Blog

In our first detailed guide, we want to help you build a blog just like ours using Notion as the CMS. Notion works great because it supports a lot of different types of elements out of the box and anyone in the team (without needing to know how to code) can simply go in and edit the content and the changes are reflected instantly on the blog.


The Railway blog is a NextJS app that uses Notion's private API as the backend for the blog posts. The posts are all stored on a table in Notion where each row is a separate page containing all the details of a single post from the URL slug, to the post authors and the content itself.

In this post, we will walk you through creating the same framework for your blog. From setting up Notion as your CMS all the way to deploying the final application on Railway.

Setting up our CMS on Notion

In this section, we'll set things up on Notion so that our app can consume them. We'll start by creating an inline table and then adding the necessary fields to it.

Posts table
Posts table

As you can see in the GIF above, we added the following fields:

  • Page (Title) - The page containing a post
  • Slug (Text) - The URL of a post
  • Published (Checkbox) - Only published blog posts show up on the website
  • Date (Date) - The date the post was published
  • Authors (Person) - A list of users that wrote the post
  • Image (Text) - The URL of the meta image for a post

The natural next step is to write our first post for our blog. Expand any of the blank rows in the posts table and fill out the necessary fields.

Post details
Post details

As you can see in the image above, we fill out all the fields we defined earlier and then write the preview text for our post and also the content of the post itself.

💡 Make sure you add the divider in between as that is what separates the preview from the content. If you don't add the divider, the preview will not show up for your posts.

Deploying our blog on Railway

Deploy on Railway

As promised, deploying a blog similar to ours on Railway can be done with the click of a button (you can also see the code that the button deploys on Github). Listed below are the required environment variables:

  • BLOG_INDEX_ID: If the URL of your page is https://www.notion.so/Blog-S5qv1QbUzM1wxm3H3SZRQkupi7XjXTul, then your BLOG_INDEX_ID is S5qv1QbU-zM1w-xm3H-3SZR-Qkupi7XjXTul
  • NOTION_TOKEN: Open the developer console in your browser, and use the token_v2 cookie.

Once you have the required variables, just add them to Railway and click Deploy. Your app should now start deploying and once that's done, you should be able to see the post you wrote live on the website you just deployed!

💡 Make sure you mark the post as published or it won't show up when you deploy your app.

Blog in production
Blog in production

With that, we have deployed our own blog using Notion as the CMS within minutes. We hope this gives you an idea of what our goal with Railway is. We want people to be able to create starters that they can share and then have their friends/teammates deploy them with the click of a button.

We also hope you enjoyed reading this blog post. Please reach out to us with feedback, suggestions, and ideas on Twitter and/or Discord. If you would like to contribute to Railway, we are very happy to have people make PRs to our starters repository.

Notes

  • The starter template for this blog is heavily based on this example so a massive shoutout to JJ Kasper for the idea.
  • Based on the source you use for your images, you will probably need to update the image key inside the next.config.js file.