Building a flat-file CMS with Angular

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • go-unsplash

    Go Client for the Unsplash API

  • Since I wanted to have thumbnails for each post (the file it uses is defined by the thumbnail field in the front matter), I decided to add some code that copies the files from our posts folder to the assets folder in Angular. This way, we can easily reference them in our Angular code. However, some of the image files I would download from Unsplash.com (fantastic public domain images btw) were huge and would take a few seconds to load in the browser. So, I delegated this task to gulp, where the files would first be piped to imagemin and then copied to the assets folder. This optimized the images for faster load times. My gulpfile.mjs looks like this:

  • gray-matter

    Smarter YAML front matter parser, used by metalsmith, Gatsby, Netlify, Assemble, mapbox-gl, phenomic, vuejs vitepress, TinaCMS, Shopify Polaris, Ant Design, Astro, hashicorp, garden, slidev, saber, sourcegraph, and many others. Simple to use, and battle tested. Parses YAML by default but can also parse JSON Front Matter, Coffee Front Matter, TOML Front Matter, and has support for custom parsers. Please follow gray-matter's author: https://github.com/jonschlinkert

  • Writing in markdown is super convenient, and supported by just about any text editor. To convert these .md files to browser-ready HTML, I wrote a simple little Node.js script using two great npm packages called gray-matter and showdown.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • Bulma

    Modern CSS framework based on Flexbox

  • So, our post.component.html component is the generic page where all posts will have their content loaded. Here, the classes are from the Bulma CSS framework, and the template looks like this:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts