Coder Social home page Coder Social logo

term's Introduction

Term

Term is a tiny, lightweight CMS purpose-built for Terminal Land. But maybe you can use it for something, too?

Features

  • Simple templating engine
  • Easy metadata management process
  • Respects existing directory structure
  • Supports Markdown
  • Effortlessly extensible

Get started

  1. Put term.php wherever you’d like on your server. If you want Markdown support, put Parsedown.php in the same location.
  2. At the root level from which your content is served, add a .htaccess file that looks like this:
Options -Indexes
DirectoryIndex /path/to/term.php
  1. In any directory from which you’re serving content, add a metadata.json file with these items at a minimum:
{
  "index": "your_index.file",
  "title": "Term",
}
  1. That’s it. Your Term-powered site is now up and running.

Make it your own

You can edit term.html to customize the template however you’d like.

Term supports “collections”, which lets you manage some metadata at one level above the current page. For example, if you have some related pages being served under a parent directory, that parent directory is a collection and you can include a metadata.json file there. That JSON string should include url, title, and icon items which will override those values from the local metadata file.

You can also set a local metadata for any given page by including a special JSON chunk, like so:

%{
  "title": "Unique page title",
  "description": "Individual page description",
}%

Here’s a list of available metadata items:

  • index: the file that should be served when the directory is accessed
  • title: the page’s title
  • collection_title: the collection’s title
  • url: the page’s canonical URL
  • collection_url: the collection’s canonical URL
  • description: the page’s description
  • stylesheet: the stylesheet path/filename to be used
  • head: any additional stuff you’d like to include in your page’s <head> section
  • icon: any HTML that you’d like to include for a page or collection specific icon (SVG works well here)

That’s all. Hope you find it useful.

term's People

Contributors

newbold avatar

Stargazers

Matt Zimmermann avatar Jacob Boily avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

korallin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.