GitHub - FeastFramework/documentation: FEAST documentation and sample project
source link: https://github.com/feastframework/documentation
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
This project is a sample project using FEAST Framework. In addition, it serves as the official repository for docs.feast-framework.com. The project makes use of the MVC system of FEAST as well as migrations. Additionally, an on-disk cache can be used to save database hits to the docs website.
Getting started
Configuring the application
In order to use this project locally (which will allow you to self-host the docs), first
copy configs/config.local.sample.php
to configs/config.local.php
then override the values with the appropriate
values.
Create a MySQL database with the same name as the config value of database.default.name
and give access to
the database.default.user
Initializing the application
From the root project of the folder run php famine feast:migration:run-all
to initialize the database.
Fetching the doc info
-
Fetch all releases with the following command
php famine release:generate
. This will download all release info from Github and populate your database. To see what code this executes, openmodules/CLI/Controllers/ReleaseController.php
and readReleaseController::generateGet
. -
Parse all markdown documentation. with the following command
php famine docs:parse
. This will use Github's api to parse the markdown to HTML and save it to the database.
Speeding up the web application
Once you have set up either Apache or nginx, the docs will function at whatever url you have configured. Each request will run through generating routes, parsing configs, and fetching database info in addition to making queries when running. Through both FEAST's built-in caching and the Documentation projects cache, all of these steps can be eliminated resulting in a (not very noticeably on most hosts) faster application!
To cache the routes, configs and dbinfo, run the following
commands: php famine feast:cache:config-generate && php famine feast:cache:routing-generate && php famine feast:cache:dbinfo-generate
.
To cache the documentation application run php famine cache:cache-all
or you can cache individual pieces.
See php famine cache:cache
for more details.
Browsing the source
The following folders contain files that are used by the documentation application:
configs
Controllers
Mapper
Migrations
Model
Modules/Cli/Controllers
Views/Index
Views/Partial
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK