Mecha is a flat-file content management system for minimalists.
The default layout uses only Serif and Mono fonts. Different operating systems might display somewhat different results. This preview was taken through a computer with Linux operating system. Serif font thats displayed in the preview below should be DejaVu Serif:
To be able to activate the back-end feature requires you to install our panel and user extensions. This feature is forever optional. You can choose to use this feature in the local version only, and get rid of it in the public version as the most basic security measure if you want.
Colors and font types in the control panel preview above are generated from the default layout files. Without them, the display will look like the preview below:
Mecha survives on the principle that a database-less site should be personal, portable, light and easy to be exported and backed up. Thats why most of the projects associated with Mecha are created with personal natures and are dedicated to be used for personal purposes such as blog, journal and diary. Mechas market shares are people with high creativity and individuals who want to dedicate themselves to the freedom of speech, that probably dont have much time to learn web programming languages. By introducing Mecha as files and folders that used to be seen by people everyday in their working desktop, we hope you will soon be familiar with the way Mecha CMS works.
Mecha is as simple as files and folders. Yet, that doesnt mean that Mecha is weak. Mecha has fairly flexible set of API that you can use without having to make it bloated, keeping you happy focused on developing your own site, according to your personality.
If you want to make something that is super huge with Mecha, that would be possible, but remember that Mecha wasnt created to replace databases. Mecha was previously created simply to help people getting rid of various resources that are not needed from the start (such as databases). There will be a time when you need a database, and when that time comes, just use a database. Mecha is fairly open to be extended with other database-based applications.
.\lot\xand your layout files to
.\lot\layout. Theyre auto-loaded.
This assumes that your sites public directory is in
$ cd /srv/http $ composer create-project mecha-cms/mecha .
$ cd /srv/http $ git clone https://github.com/mecha-cms/mecha.git --depth 1 . $ rm LICENSE README.md $ rm -r .git
Download the installer file from https://mecha-cms.com/start and then follow the instructions.
content-lengthheader to facilitate AJAX-based applications with progress bars.
linkto the core extensions.
contentfunction to allow user to use this function to create a file.
SGMLclass when parsing attributes contain Base64 image URL.
$alertvariable multiple times and all
<alert>elements will appear at each location.
\now will be converted into
__will be converted into
$link->currentin layout navigation.
.htaccess. The main
.htaccessfile should focus only to the rewrite module.
YAML\EOTconstant in the YAML extension (#94)
Guard::kick()with default value set to
Routeas alias of
foo/bar/:bazwill be equal to
This update focuses on improving the pagination feature of page extension.
$pager->prev will now return a
Page instance or
null. This allows us to get richer data easily from the previous and next page property such as to retrieve title, description and image thumbnail to be displayed in the previous and next page navigation HTML.
$pager->prevare now return a
Pathmethods to allow
This update focuses on improving the token feature so that it is not too strict. We need to give other extension opportunities to load the current page for certain purposes without having to change the current token.
From::HTML()with default value set to
falseto prevent double encode HTML special characters.
X-Requested-Withheader field to
fetch()with default value set to
CURLto let the client to know that the request is not came from a normal web browser (#86)
<figure>element automatically from every image that appears alone in a paragraph.
Guard::token()to set delay time for the token to refresh. The default value is one minute. Previously, every token will be refreshed on every page visits. This causes several obstacles if some extensions require to reload the page to build the cache (even if it is only to load pages in the background) or to prepare it to load the next page via the HTML5 prefetch feature.
Cache::stale()for more semantic method naming (#84)
Route::hit()to make it in-line with
This update focuses on stabilizing the
URL class. In this version, you can use the class to parse all types of URLs, not only internal URLs but also external URLs. Mecha has its own specifications regarding URLs, and is a bit different from the native PHP
parse_url function. One of them is the presence of
i properties. You can learn more about this on the URL reference page.
$iparameter to the
$lotparameter applied to
Route::fire()does not give any effect.
sendfunction not sending HTML email.
Compatible with PHP 7.1.0 and above. Mecha uses
Closure::fromCallable() method (which is only available in PHP version 7.1.0 and above) to convert named function into closures, so that we can pass
$this reference from another class instance to the function body even if its a named function. The
?? operator becomes a must-have feature in this version as we no longer use extra
$fail parameter on certain class methods to set default values.
Pagerto a separate Page extension.
$thisproperty inside the hook function, either as a named function or as an anonymous function.
index.phpfile that will be read automatically.
.\lot\extenddirectory address to
P. P stands for Placeholder.
nullvalue everywhere as the default value for all inaccessible data. From now on, use the
??operator to determine alternative value.
$pagesvariable is now a generator. Every page data in it will be loaded only if you iterate over the generator.
Compatible with PHP 5.3.6 and above.