This is http://docs.ongr.io docs site code. It can gather docs from multiple repositories, convert to HTML and index them in to the Elasticsearch.
* Elasticsearch >=2.0
* PHP >=5.5
* npm >= 3.0 from node.js
This website is based on Symfony framework. To get it running folow the steps below:
Clone the repository:
git clone https://github.com/ongr-io/docs.ongr.io.git
Install vendors.
Symfony vendors are installed via Composer:
composer install --prefer-dist
We build assets via Gulp:
npm install
bower install
gulp
Create elasticsearch index. Before creating index you might want to change index name and elasticsearch
connection settings. To do that take a look at the Symfony configuration file (app/config/config.yml
)
under ongr_elasticsearch
node.
Run:
bin/console ongr:es:index:create
To run site quickly at the local env you can do it via PHP built-in server, run:
bin/console server:run
For the Github synchronization you have to get access token, how to get it can be found in the Official Github docs. Once you have it add it to the parameters.yml:
#app/config/parameters.yml
parameters:
#...
github_token: YourNewTokenHere
By default the token is set to
xxx
in theparameters.yml.dist
.
For repositories synchronization you have to add a list of repositories you want to sync in repos
parameter.
E.g. our list is defined in global services.yml
:
#app/config/services.yml
parameters:
#...
repos:
- {org: ongr-io, repo: ElasticsearchBundle}
- {org: ongr-io, repo: FilterManagerBundle}
- {org: ongr-io, repo: ElasticsearchDSL}
- {org: ongr-io, repo: RouterBundle}
- {org: ongr-io, repo: ApiBundle}
There is a CLI command which runs the sync through all configured repositories and add's it to the index.
Run:
bin/console ongr:md:sync