My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
SetupLocalMootoolsDoc  
Updated Feb 16, 2009 by Oleg.Che...@gmail.com

Установка локальной копии русской документации по MooTools 1.2

Иногда намного удобнее вытянуть доку на локальный комп и пользоваться ней локально. Тут есть пара неудобств;

  1. Дока может устареть
  2. Дока не всегда сверстана в таком виде чтоб ее можно было без проблем установить локально.

Для решения указанных проблем предусмотренно следующее:

  1. Установите SVN и для вас всегда может быть доступна самая свежая версия документации
  2. # Non-members may check out a read-only working copy anonymously over HTTP.
    svn checkout http://mootools-docs-ru.googlecode.com/svn/trunk/ mootools-docs-ru-read-only
  1. Вторую проблему можно решить с помощью установки nginx на свой домашний комп.
    1. Качаем nginx for windows (Он занимает чуть более 1M)
    2. Запускаем setup, "по умолчанию" все установиться в "C:\nginx\"
    3. Добавляем C:\WINDOWS\system32\drivers\etc\hosts сточку
    4. mootools  127.0.0.1
    5. Модифицируем немного C:\nginx\conf\nginx.conf, в секции http пишем следующее
    6. # Virtual hosts
      include /nginx/conf/mootools.conf;
    7. Создаем в єтой же директории файл mootools.conf
    8.     server {
              listen      80;
              server_name mootools;
      
              location / {
                      rewrite  ^/docs/mootools/.*$  /docs/mootools/index.html   last;
      
                      root /nginx/virtual/mootools-doc-ru;
                      #index  index.html index.htm;
                      autoindex on;
                      ssi  on;
                      #expires     1h;
              }
      
              location /docs/mootools/index.html {
                      if ( $request_uri ~* ^/docs/mootools/(.*?)/?$ ) {
                          set  $section  $1;
                      }
                      if ( $section = "" ) {
                          set  $section  "Core/Core";
                      }
      
                      root /nginx/virtual/mootools-doc-ru;
                      #index  index.html index.htm;
                      autoindex on;
                      ssi  on;
              }
      
      
              location ~* \.(jpg|jpeg|gif|png)$ {
                  root /nginx/virtual/mootools-doc-ru;
                  #root /var/www/linux/www/;
                  access_log   off;
                  expires max;
              }
      
              error_log    logs/linux_access_error.log;
              access_log   logs/linux_access.log  main;
          }
    9. Раскоментируем в основном конфиге
    10.     log_format  main  '$remote_addr - $remote_user [$time_local] $request '
                            '"$status" $body_bytes_sent "$http_referer" '
                            '"$http_user_agent" "$http_x_forwarded_for"';
    11. С помощью SVN вытягиваем документацию в папку C:\nginx\virtual\mootools-doc-ru
    12. Запускаем start-nginx.bat и набирем в браузере http://mootools, пользуемся!

Comment by sab.in...@gmail.com, May 16, 2009

svn checkout http://mootools-docs-ru.googlecode.com/svn/trunk/ mootools-docs-ru-read-only doesn't exist


Sign in to add a comment
Powered by Google Project Hosting