Live data from Hacker News

Show HN: Pages CMS – A CMS for GitHub

pagescms.org

1–10 of 122 posts

Show HN: Pages CMS – A CMS for GitHub

#1
In a nutshell:

1. You log in with your GitHub account.

2. You select the GitHub repo where your site/app is at (whether it's Next.js, 11ty, Hugo, Nuxt... as long as you're using flat files for content).

3. You add a single config file to your repo to define the content types and other settings (e.g. media folder).

4. Congrats: you now have a user friendly CMS to manage content + media BUT all changes are still tracked like regular commits (under your account) on GitHub.

I started using Jekyll around 2009 and over the course of the past 10+ years, I've helped build major sites and tiny blogs with Hugo, Gatsby, Next.js and more recently 11ty.

I still love it.

BUT once you're done building, managing content and media can be a bit of a pain. You have a few options:

- Edit files directly (on GitHub or your local). Good luck getting your colleagues on the marketing team to do that.

- Hook up a headless CMS like Contentful, Sanity, or Strapi. That works, but it's one more dependency and (IMHO) overkill in most cases.

- OR you could use something like [Decap CMS](https://decapcms.org/). Really cool project, but I've never been a fan of the UI/UX, and it's been a bit of a pain to setup (maybe that's just me).

I wanted something as simple as possible, preferably with nothing to install or deploy.

Back in 2018, I had built a prototype (Jekyll+) [1] with the idea of getting a CMS set up by just adding a single configuration file to your GitHub repository.

Pages CMS [2] is a continuation of that idea. It's 100% free and Open Source: https://github.com/pages-cms/pages-cms.

If you don't want to use the online version because you're not comfortable signing up with your GitHub account, consider the following options:

- Use a fine-grained personal access token [3], there's an option on the login screen. There is still a bug if you try to access a repo that isn't part of your token scope, but I'll get it fixed in the next couple of days.

- Deploy it yourself (for free) on Cloudflare Pages. Literally 5 minutes of work max. I made a video walking you through the process [4].

- Check out the intro video on the front page [2] (a bit crap, but I'll get a better one up in the next few days).

I use it actively with a few other teams, I hope it will be of use to some of you.

I'm already working on adding a few nicer features, like collaborative editing and email invites (to let non-developers login without a GitHub account).

PS: I've spent the past 8+ years building a business and only recently got back into coding. I'd love pointers as to what I could do better (and how I can manage my Powerpoint PTSD).

[1]: https://github.com/hunvreus/jekyllplus/

[2]: https://pagescms.org

[3]: https://docs.github.com/en/authentication/keeping-your-accou...

[4]: https://pagescms.org/docs/development/

Show HN: Pages CMS – A CMS for GitHub
pagescms.org

Re: Show HN: Pages CMS – A CMS for GitHub

#5

This is super cool! Tried to set it up for our open source Changelog though and getting some errors, it doesn't seem to work with .mdx files https://github.com/juneHQ/changelog Anyways this looks super promising

I have a very surface understanding of mdx, but basically it's a mix of markdown and JSX syntax, no? Didn't know you could define some sort of fields like you seem to do with:

  import { MdxLayout } from "components/mdx-layout.tsx";
  
  export const meta = {
    slug: "all-time-high",
    publishedAt: "2022-09-16T10:00:00.000Z",
    title: "All time high",
    headerImage: "https://june-changelog.s3.eu-central-1.amazonaws.com/changelog_ath_cd256d0719.png",
    authors: [
    (...)
I suppose I should be able to hack it by defining it as a JSON frontmatter and some custom delimiters.

If you let me know how you would see this working, I'll try and get something working tomorrow.

Re: Show HN: Pages CMS – A CMS for GitHub

#6

So the site has to hosted on GitHub Pages or just the website code needs to be using GitHub? Eg what if I have the site hosted elsewhere that just relies on GitHub commits?

Just the code.

For example, https://pagescms.org is an 11ty website:

- The code is hosted on GitHub: https://github.com/pages-cms/website - The site is built and hosted by Cloudflare Pages

You can have a look at the config there: https://github.com/pages-cms/website/blob/main/.pages.yml

Re: Show HN: Pages CMS – A CMS for GitHub

#7
post #5

This is super cool! Tried to set it up for our open source Changelog though and getting some errors, it doesn't seem to work with .mdx files https://github.com/juneHQ/changelog Anyways this looks super promising

I have a very surface understanding of mdx, but basically it's a mix of markdown and JSX syntax, no? Didn't know you could define some sort of fields like you seem to do with: import { MdxLayout } from "components/mdx-layout.tsx"; export const meta = { slug: "all-time-high", publishedAt: "2022-09-16T10:00:00.000Z", title: "All time high", headerImage: "https://june-changelog.s3.eu-central-1.amazonaws.com/changelog_at…

Honestly as a v1, I'd just love for you to parse out the whole text file and give me a basic markdown editor!

I don't particularly care about having advanced filtering or of parsing my "meta" data

Re: Show HN: Pages CMS – A CMS for GitHub

#8
post #6

So the site has to hosted on GitHub Pages or just the website code needs to be using GitHub? Eg what if I have the site hosted elsewhere that just relies on GitHub commits?

Just the code. For example, https://pagescms.org is an 11ty website: - The code is hosted on GitHub: https://github.com/pages-cms/website - The site is built and hosted by Cloudflare Pages You can have a look at the config there: https://github.com/pages-cms/website/blob/main/.pages.yml

Perfect, thanks! Awesome stuff here I think it’s going to be what a large swath of users have been looking for!

Re: Show HN: Pages CMS – A CMS for GitHub

#9
Nice to see a new entry in the git based CMS realm, I really appreciate that you seem to understand the importance of a good user experience for editing content!

Am I gathering correctly that this does not actually require you to host a backend somewhere? The GitHub OAuth will work even if the CMS is just statically hosted on Cloudflare Pages / Netlify? This was something I always found a little strange about Netlify CMS / Decap, the fact that it required you to either use Netlify or self host their git-gateway.

Edit: Nevermind, I saw it does the auth through serverless functions https://github.com/pages-cms/pages-cms/tree/main/functions/a... I guess it's impossible to do it frontend-only, looks like a fair compromise to me

Post reply on HN