Giter VIP home page Giter VIP logo

yarcms's Introduction

YARCMS

Yet another really (simple) CMS.

Dependencies

Supports Apache or nginx.

Apache

* PHP 5.3 or newer with JSON extension
* mod_rewrite and mod_auth enabled

Nginx

* PHP 5.3 or newer with JSON extension
* access to your servers config files

Installation

* For apache: Make sure all dependencies are installed and then simply put all files in the directory root. 
* For Nginx:  Install all dependencies then adapt and use nginx.cfg as a configuration.  

How it works

This is a really small CMS. It has no editing interface (yet). Pages can currently be written in Markdown or (pure) HTML.

Whenever a page is requested from the server, the cms will check if:

  • The exact file exists in the data/content directory and it has a congtent type specefied in lib/static.
  • The file plus extension has a renderer in the data/render directory.

In the first case the file is directly served with the given content type, otherwise it is passed on to the renderer. In case the file is passed onto the renderer, then the goes through the template as well.

For directory indexes, use the filename index. It will always take precedence. For not found files, use the filename 404.

Renderers

Standard Ones

* Markdown (md)
* HTML (htm) - May only include the <body> content

Special ones

* 301 Redirects (r301): Redirect pages via a 301. The url to redirect to should be put directly inside the file. 
* 302 Redirects (r302): The same as above, just via a 302. 

Static File Types

  • png
  • jpg
  • jpg
  • html - HTML without headers

YARCMS Config files

In each content directory, the .yarcms file can be used to customize the menu and further variables. Example:

{
	"menu": [
		["Menu one", "/"], 
		["Another link", "/de/index"], 
		["An external link", "http://example.com"]
	], 
	"properties": {
		"lang": "en"
	}, 
	"template": "basic", 
	"index": "index.html"
}

The properties object will be parsed to the template as the variable $YARCMS_contentProperties. The menu will be built automatically.

The template property determines the template to be used.

In case a directory does not have this file, the template will check in the parent directory.

The index property, if set, determines which index file to use. This must be relative to the current .yarcms file.

License

(c) Tom Wiesing 2014 Licensed under Attribution-NonCommercial-ShareAlike 4.0 International

Used Libraries

yarcms's People

Contributors

tkw1536 avatar

Watchers

James Cloos avatar  avatar  avatar

yarcms's Issues

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.