Open Source documentation for MODX Revolution

Want to introduce to you the new project management open documentation for MODX Revolution.

Why?

Then that system is not new, and the normal Russian-language documentation is still there. All that is scattered across various communities and blogs, which some tens, and any novice user runs here and there, asking questions.

Official documentation Russian is not conducted. I do not know now, but years ago they simply were not preserved Cyrillic.

Why not do it on the website n or z?

Because these sites have owners, they have to ask for logins\passwords there is no guarantee that tomorrow the website will not disappear, leaving your contribution in the Google cache.

For example, I tried to write about their own additions on the official website, and then they redid it and my login password is no longer suitable. Just you can not register — you need to get them through the letter in support. Of course, re-doing it there is no desire.

In addition, the MODX community has little cohesion, and the core developers just don't gather in one place so they have something wrote there.

what do you suggest?

Very simple — you need to conduct documentation on GitHub well-known Markdown.

This system assures us:
the

    Preservation of all texts. Everyone can fork the repository and host.

    revision History. All changes at a glance, you can see who and what is written.

    Independence. You can write about any topic relating to MODX, in any language. And you don't need to ask for this access — it is enough to have an account on GitHub.



Not a new idea, and I spied her at the project daux.io. Is a PHP script that generates the site on the finished markdown files.
It is very simple, and allows you to run your website with documentation, not having any skills on any hosting. However, in my opinion, it has several shortcomings (which are the continuation of merit).

For example, I'm not sure that dynamically generated site files without caching will work well on several thousands of pages. Also, there is no search, no management URLs, easy switching between language versions, even on little things.

So, to show our documentation, I used a favorite system — MODX.

How it works?

This is a common site on MODX, built using standard additions, but all of these pages are imported from a file.

This gives:
the
    the
  • Caching. All documents will be loaded from the cache and does not need wool the files on the HDD.
  • the
  • Control document url — can be moved around without losing the referrals from the search engines.
  • the
  • Ability to organize the search.
  • the
  • Comfortable working with languages they may be as much as necessary.
  • the
  • Opportunity in the future to enable a site to log in (HybridAuth) and comments (Tickets).


In the site tree are a slice of the documents.


I want to keep the possibility of a full upgrade tree pre-treatment table, so the special pages generated on the fly and not kept in the database. This is a new notion, let's see how it will work.

For example, the site map is given here:
the
<?php
if ($modx->event->name != 'OnHandleRequest' || $modx->context->get('key') == 'mgr') {return;}

$alias = $modx- > getOption('request_param_alias', null, 'alias');
$request = strtolower($_REQUEST[$alias]);

if ($request == 'sitemap.xml') {
$output = $modx- > runSnippet('pdoSitemap', array('context' => 'web,en'));
exit($output);
}


And here's the search page:
the
elseif ($request == 'search') {
$doc = $modx- > newObject('modResource');
$doc->fromArray(array(
'id' => 100000000,
'context_key' => $modx->context->key,
'pagetitle' => $modx->context->key == 'en' ? 'Search' : 'Search',

'content' => '
[[!pdoPage@Search?context=`.$modx->context->key."]]
[[+page.nav]]
'
));
$modx- > resource = $doc;
$response = $modx->getResponse();

$output = $modx->response->outputContent();
exit($output);
}

It goes through the plug on the OnHandleRequest event and depends on the context (language version).

The layout I sketched on Bootstrap 3, to make it comfortable to read with phones and tablets. For use:
the
    the
  • pdoTools — the conclusion of neighboring documents, all menus and breadcrumbs.
  • the
  • mSearch2 — stemming.
  • the
  • DateAgo — pleasant formatiranje date
  • the
  • yTranslit — generate page URLs using the Yandex.
  • the
  • MinifyX gluing and compressing scripts and styles, for fast loading pages.
  • the
  • Markdown — new snippet to display text in this format. Wrote specifically for this project.


Once again, that this documentation belongs to no one. I made my own version of the website to its conclusion and you can clone the repository and run it on the same daux.io — structure of directories and files are compatible.

The purpose of the project, to give finally a tool for the community to gather all the information in one place and together to use it. Join!

Links

Repository documentation on Gitub.
Site withdrawal this document.

Future plans: to develop a simple API to texts on other sites and (possibly) cakrawala url.

the

updated 15.01.2014


In connection with discontent of the domain name, moved the documentation for docs.modx.pro.

Hope there is no objection.
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

Car navigation in detail

PostgreSQL: Analytics for DBA

Google has launched an online training course advanced search