Giter Club home page Giter Club logo

slimframework-ru-website's Introduction

Сайт русской документации фреймворка Slim.

Установка

  1. Клонировать репозиторий

    git clone [email protected]:slimframework-ru/mdReader.git /path/to/project
  2. Установить зависимости

    composer install
  3. Если нет файла /path/to/project/config/config.php, скопировать из примера

    cd /path/to/project/config
    php -r "file_exists('config.php') || copy('config.example.php', 'config.php');"
  4. Настроить конфигурацию приложения (файл /path/to/project/config/config.php)

    return array(
        'metrika' => null, // Идентификатор Яндекс.Метрики
        'repository' => 'https://github.com/slimframework-ru/slim.ru', // Репозиторий с markdown-файлами документации. Необходим для ссылки "Редактировать страницу".
        'website' => 'http://slimframework.ru', // Адрес сайта. Необходим для микроразметки.
        'ads' => array( // Рекламные площадки
            'google' => array( // Google Ad
                'show' => false, // Включить показ рекламы
                'format' => '', // Формат (fluid)
                'layout' => '', // Layout key
                'client' => '', // Google Ad Client
                'slot' => '',   // Слот
            ),
        ),
    );
  5. Настроить вебсервер так, чтобы DOCUMENT_ROOT был в /path/to/project/public и все несуществующие файлы обрабатывались файлом index.php. Для примера, конфиг nginx

    server {
        listen 80;
        server_name slimframework.ru;
        root /path/to/project/public/public;
        index index.php index.html;
    
        location ~* \.(jpg|jpeg|gif|css|png|js|ico|txt)$ {
            access_log off;
            expires max;
            log_not_found off;
        }
    
        location / {
            try_files $uri $uri/ /index.php?$query_string;
        }
    
        location ~ \.php$ {
            include fastcgi.conf;
            fastcgi_pass unix:/run/php/php-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            add_header Cache-Control "no-store";
        }
    
        location ~ /\.ht {
            deny all;
        }
    }
    
  6. Добавить симлинк для изображений из md

    cd /path/to/project/public/assets/images
    ln -s ../../../md/images md
  7. Добавить файлы документации (в формате markdown) в директорию /path/to/project/md/v{VER}, где {VER} - номер версии фреймворка. Эти файлы можно взять из репозитория

  8. Оглавление редактируется в файлах /path/to/project/sidebar/v{VER}.php, где {VER} - номер версии фреймворка.

slimframework-ru-website's People

Contributors

bad4iz avatar ddrv avatar

Watchers

 avatar

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.