All Projects → contentz-tech → contentz

contentz-tech / contentz

Licence: MIT License
Create Content, Get a Highly Optimized Website

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to contentz

presta
Minimalist serverless framework for SSR, SSG, serverless APIs and more.
Stars: ✭ 89 (+56.14%)
Mutual labels:  static-site-generator, static-site, ssg
wordpress-scaffold
The scaffold for GRRR's WordPress Pro setup.
Stars: ✭ 16 (-71.93%)
Mutual labels:  static-site-generator, static-site, ssg
jekyll-skeleton
Scaffolding to start with a Jekyll website
Stars: ✭ 27 (-52.63%)
Mutual labels:  static-site-generator, static-site
sistine
A simple, flexible, productive static site generator written entirely in Ink
Stars: ✭ 17 (-70.18%)
Mutual labels:  static-site-generator, static-site
nera
A lightweight static site generator
Stars: ✭ 12 (-78.95%)
Mutual labels:  static-site-generator, static-site
jschr.io
The static website generator service behind jschr.io.
Stars: ✭ 70 (+22.81%)
Mutual labels:  static-site-generator, static-site
static-web-apps-gallery-code-samples
A community showcase of projects built with Azure Static Web Apps 🎉 Visit: https://microsoft.github.io/static-web-apps-gallery-code-samples/
Stars: ✭ 96 (+68.42%)
Mutual labels:  static-site-generator, static-site
oliverbenns.com
oliverbenns.com
Stars: ✭ 51 (-10.53%)
Mutual labels:  static-site-generator, static-site
trailing-slash-guide
Understand and fix your static website trailing slash issues!
Stars: ✭ 255 (+347.37%)
Mutual labels:  static-site-generator, ssg
generator-veams
Scaffold modern frontend web apps or web pages with a static site generator (Assemble or Mangony), Grunt and/or Gulp, Sass and Bower. Use modern frameworks like Bourbon, Bootstrap or Foundation and structure your JavaScript with ES Harmony support.
Stars: ✭ 45 (-21.05%)
Mutual labels:  static-site-generator, static-site
jekyll-rdf
📃 A Jekyll plugin to include RDF data in your static site or build a complete site for your RDF graph
Stars: ✭ 46 (-19.3%)
Mutual labels:  static-site-generator, static-site
voldemort
A simple static site generator using Jinja2 and Markdown templates.
Stars: ✭ 48 (-15.79%)
Mutual labels:  static-site-generator, static-site
personal-website
Personal website – made with Next.js, Preact, MDX, RMWC, & Vercel
Stars: ✭ 16 (-71.93%)
Mutual labels:  mdx, ssg
Bolt
⚡ is a fast grunt based, data driven, static site seed project, for rapid web development of PWA's or JAMstack projects
Stars: ✭ 30 (-47.37%)
Mutual labels:  static-site-generator, offline-first
sutanlab.id
☕️ My Personal Homepage & Blog site with NextJS. 🇺🇸 🇮🇩
Stars: ✭ 39 (-31.58%)
Mutual labels:  static-site-generator, static-site
gisture
A minimal and flexible blog generator based on GitHub Gist.
Stars: ✭ 24 (-57.89%)
Mutual labels:  static-site-generator, ssg
hugo-initio
Hugo Theme port of Initio bootstrap template by GetTemplate
Stars: ✭ 58 (+1.75%)
Mutual labels:  static-site-generator, static-site
Blended
The Most Versatile Static HTML Site Generator
Stars: ✭ 22 (-61.4%)
Mutual labels:  static-site-generator, static-site
awesome-astro
Curated resources on building sites with Astro, a brand new way to build static and server rendered sites, with cross-framework components, styling and reactive store support.
Stars: ✭ 210 (+268.42%)
Mutual labels:  static-site-generator, static-site
jigsaw-docs-template
Starter template for a documentation site, using Jigsaw by Tighten
Stars: ✭ 39 (-31.58%)
Mutual labels:  static-site-generator, static-site

Contentz

license releases npm version dependencies

Create Content, Get a Highly Optimized Website

  • Use MDX to write articles and pages
  • Support Incremental Build
  • Offline First
  • Use Frontmatter to define metadata for your articles and pages
  • Prefetch every internal link used in your content
  • Get an archive page with linked and prefetched articles
  • Get a homepage with links to social networks
  • Good Looking Responsive Design
  • Automatic Dark Mode (in Safari)
  • Apply CSS in MDX using the css prop and the css template tag
  • Internationalization
  • Generate social images (Open Graph) in a single command
  • Automatically generate table of contents

Install it

Install it using npm or yarn with a simple command

yarn add contentz
# npm install contentz

Use it

After you have installed Contentz you could use it with a simple command.

contentz build

That will read your files and generate your website for you.

Create configuration

Create a configuration file called config.yml

---
title: Sergio Xalambrí
description: Senior Software Engineer and Technical Writer
domain: https://sergiodxa.com
language: en
repository: https://github.com/sergiodxa/personal-site/
email: [email protected]
patreon: sergiodxa
analytics: UA-XXXXXXXXX-2
social:
  twitter: sergiodxa
  github: sergiodxa
  npm: sergiodxa
  linkedin: sergiodxa
  dev: sergiodxa
  meetup: 182915204
navigation:
  - name: About
    path: /about
  - name: Services
    path: /services

Table of options

Option Description Required
title The title of the website, used in the <title> and in the homepage No (default: Just another Contentz site)
description The description of the website, used in the <meta> and in the homepage No (default: empty description)
domain The domain you are going to use to host the website, used in the RSS feed Yes
language The main language of the website, used as fallback for articles and pages No (default: en)
repository The GitHub repository hosting the website, used in the footer of articles and pages No (default: hide link to edit)
email Your email address, used on the Email icon in the homepage No (default: hide icon)
patreon Your Patreon username, used in the homepage and the footer No (default: hiden patreon message)
analytics Your Analytics UA No (default: hide analytics)
social A list of your social networks, used to link them in the homepage No (default: hide social icons)
navigation A list of pages to link in the header No (default: don't add extra links)
sw Set it as false if you want to disable SW generation No (default: true)
incremental Set it as false if you want to disable incremental build No (default: true)
icon Set the path of the favicon of the website No (default: /static/favicon.png)

Possible social networks

For other Social Networks send a PR with a new icon and add a way to format the URL for that icon.

Start Writing

Create a folder /articles and put your .mdx files there, here's an example post.

---
title: My super cool article
description: This is the description of the article
date: 2018-01-01T00:00:00.000Z
published: true
---

This is my content, here I could use markdown or import a component and render it.

Now run contentz and it will create a /public directory with your homepage, archive page and article. You could access your archive at /articles/ and each article as /articles/:article/, in the example you may see it at /articles/my-super-cool-article.

Custom Pages

For custom pages create a /pages folder and put your .mdx files there, here's an example page.

---
title: About me
---

Hi! I'm an example page.

Now run contentz and it will create a /public directory with your homepage and pages. Each page will be put at the base level of public, that mean your /pages/about.mdx could be accessed as /about/ in your browser and not /pages/about.

Link Sharing

In case you want to have a page to share interesting links you could create a link.yml file at the root of your project. Then run contentz and it will automatically generate a /link/ page for you with a list of all your links. Each link should have url, title, comment and date key. Example file:

---
- url: https://sergiodxa.com/
  title: Sergio Xalambrí
  comment: The website of the creator of Contentz
  date: 2019-01-28T19:44:10.945Z
- url: https://sergiodxa.dev/
  title: sergiodxa.dev
  comment: The alias of the website of the creator of Contentz
  date: 2019-01-28T19:44:10.945Z

Error Page

Contentz will automatically generate an error page on /404.html, when deploying you could redirect not found pages to /404.html.

If you deploy to Netlify it will pick up that file automatically.

Service Worker and Offline Mode

Contentz generate a SW automatically for you, this SW will cache every request to your own website (using location.origin). It will not cache request to another domain.

This behavior could be disabled adding sw: false to your config.yml file. Adding this will also delete de sw.js and load-sw.js to avoid cached access to the and create the unload-sw.js file.

RSS Feed

Contentz will generate a valid RSS Atom feed automatically with your list of articles, it will be placed in /atom.xml and a <meta> tag will be automatically added for you in each page to make it discoverable.

Static Files

If you want to link to static files like images, videos, etc. create a /static folder and put all your files there. When running content they will be automatically copied to /public/static

Style in MDX

In case you want to add an HTML tag with custom styles directly in your MDX content you could use the css prop and the css template tag of Emotion.

Example:

<div css={{ color: "red" }}>This is red</div>
<div css={css`color: blue`}>This is blue</div>

Incremental Build

Contentz will detect what files changed and only update the related files. This mean if you add a new link only /link/ will be regenerated, but if you change an article the article pages, the list of articles and the RSS feed will be regenerated.

In the case you update the configuration or you update Contentz version all pages will be regenerated.

If you want to opt-out of this feature set incremental: false in your config.yml. This will automatically invalidate previous caches and always generate all pages.

Social Image

Contentz could also automatically generate social images (aka Open Graph) for you to use in your articles and pages. To use it run the command:

contentz social [path]

Where [path] is the file to use to generate the social image. It could also be more than one file adding an space between them.

contentz social [path1] [path2]

A path could be a path for an article, a post or one of the auto generated pages.

  • home
  • archive/articles
  • links
  • error

If you want to generate them initially run

contentz social home articles links error

After generating the social images you will see a folder /static/_social with your images, pages will be placed in /static/_social/pages and articles in /static/_social/article, special pages will be at the root of _social.

Internationalization

Contentz support i18n out of the box for the fixed texts of the website, text like the Patreon support or edit on GitHub. To change the main language of your website set the key language or the key lang (language is prefered) to the language code.

Supported languages are es for Spanish and en for English (default to English in case of invalid language code).

If your language is not supported add a JSON with the messages and load it in the i18n lib. Then send a PR to add it.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].