Updated to KH 3.3 and improved
This commit is contained in:
@@ -24,6 +24,20 @@ First, copy this config and place in it `<module>/config/userguide.php`, replaci
|
||||
// Copyright message, shown in the footer for this module
|
||||
'copyright' => '© 2010–2011 <Your Name>',
|
||||
)
|
||||
),
|
||||
|
||||
/*
|
||||
* If you use transparent extension outside the Kohana_ namespace,
|
||||
* add your class prefix here. Both common Kohana naming conventions are
|
||||
* excluded:
|
||||
* - Modulename extends Modulename_Core
|
||||
* - Foo extends Modulename_Foo
|
||||
*
|
||||
* For example, if you use Modulename_<class_name> for your base classes
|
||||
* then you would define:
|
||||
*/
|
||||
'transparent_prefixes' => array(
|
||||
'Modulename' => TRUE,
|
||||
)
|
||||
);
|
||||
|
||||
|
@@ -6,17 +6,17 @@ The userguide has the following config options, available in `config/userguide.p
|
||||
(
|
||||
// Enable the API browser. TRUE or FALSE
|
||||
'api_browser' => TRUE,
|
||||
|
||||
|
||||
// Enable these packages in the API browser. TRUE for all packages, or a string of comma seperated packages, using 'None' for a class with no @package
|
||||
// Example: 'api_packages' => 'Kohana,Kohana/Database,Kohana/ORM,None',
|
||||
'api_packages' => TRUE,
|
||||
|
||||
|
||||
);
|
||||
|
||||
You can enable or disabled the entire api browser, or limit it to only show certain packages. To disable a module from showing pages in the userguide, simply change that modules `enabled` option using the cascading filesystem. For example:
|
||||
You can enable or disable the entire API browser, or limit it to only show certain packages. To disable a module from showing pages in the userguide, simply change that module's `enabled` option using the cascading filesystem. For example:
|
||||
|
||||
`application/config/userguide.php`
|
||||
|
||||
|
||||
return array
|
||||
(
|
||||
'modules' => array
|
||||
@@ -31,5 +31,5 @@ You can enable or disabled the entire api browser, or limit it to only show cert
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Using this you could make the userguide only show your modules and your classes in the api browser, if you wanted to host your own documentation on your site. Feel free to change the styles and views as well, but be sure to give credit where credit is due!
|
||||
|
||||
Using this you could make the userguide only show your modules and classes in the API browser, if you wanted to host your own documentation on your site. Feel free to change the styles and views as well, but be sure to give credit where credit is due!
|
@@ -1,5 +1,3 @@
|
||||
[!!] When the docs get merged these images/links should be update
|
||||
|
||||
# Contributing
|
||||
|
||||
Kohana is community driven, and we rely on community contributions for the documentation.
|
||||
@@ -18,7 +16,7 @@ To quickly point out something that needs improvement, report a [bug report](htt
|
||||
|
||||
If you want to contribute some changes, you can do so right from your browser without even knowing git!
|
||||
|
||||
First create an account on [Github](https://github.com/signup/free).
|
||||
First create an account on [GitHub](https://github.com/signup/free).
|
||||
|
||||
You will need to fork the module for the area you want to improve. For example, to improve the [ORM documentation](../orm) fork <http://github.com/kohana/orm>. To improve the [Kohana documentation](../kohana), fork <http://github.com/kohana/core>, etc. So, find the module you want to improve and click on the Fork button in the top right.
|
||||
|
||||
@@ -36,31 +34,42 @@ After you have made your changes, send a pull request so your improvements can b
|
||||
|
||||
Once your pull request has been accepted, you can delete your repository if you want. Your commit will have been copied to the official branch.
|
||||
|
||||
## If you know git
|
||||
## If you know Git
|
||||
|
||||
**Short version**: Create a ticket on redmine for your changes, fork the module whose docs you wish to improve (e.g. `git://github.com/kohana/orm.git` or `git://github.com/kohana/core.git`), checkout the appropriate branch, make changes, and then send a pull request with the ticket number.
|
||||
### Short version
|
||||
|
||||
**Long version:** (This still assumes you at least know your way around git, especially how submodules work.)
|
||||
Fork the module whose docs you wish to improve (e.g. `git://github.com/kohana/orm.git` or `git://github.com/kohana/core.git`), checkout the `3.2/develop` branch (for the 3.2 docs), make changes, and then send a pull request.
|
||||
|
||||
1. Create a ticket on redmine for your changes.
|
||||
### Long version
|
||||
|
||||
2. Fork the specific repo you want to contribute to on github. (For example go to http://github.com/kohana/core and click the fork button.)
|
||||
(This still assumes you at least know your way around Git, especially how submodules work.)
|
||||
|
||||
1. Fork the specific repo you want to contribute to on GitHub. (For example, go to http://github.com/kohana/core and click the fork button.)
|
||||
|
||||
1. Now you need to add your fork as a "git remote" to your application and ensure you are on the right branch. An example for the [ORM](../orm) module and 3.2 docs:
|
||||
|
||||
cd my-kohana-app/modules/orm
|
||||
|
||||
3. Now go into the repo of the area of docs you want to contribute to and add your forked repo as a new remote, and push to it.
|
||||
|
||||
cd system
|
||||
|
||||
# make sure we are up to date
|
||||
git checkout 3.1/develop
|
||||
git pull
|
||||
|
||||
# add your repository as a new remote
|
||||
git remote add <your name> git@github.com:<your name>/core.git
|
||||
|
||||
# (make some changes to the docs)
|
||||
|
||||
# now commit the changes and push to your repo
|
||||
git commit
|
||||
git push <your name> 3.1/develop
|
||||
git remote add <your name> git://github.com/<your name>/orm.git
|
||||
|
||||
4. Send a pull request on github containing the ticket number, and update the ticket with a link to the pull request.
|
||||
# Get the correct branch
|
||||
git checkout 3.2/develop
|
||||
|
||||
1. Now go into the repo of the area of docs you want to contribute to and add your forked repo as a new remote, and push to it.
|
||||
|
||||
cd my-kohana-app/modules/orm
|
||||
|
||||
# Make some changes to the docs
|
||||
nano file.md
|
||||
|
||||
# Commit your changes - Use a descriptive commit message! If there is a redmine ticket for the changes you are making include "Fixes #XXXXX" in the commit message so its tracked.
|
||||
git commit -a -m "Corrected a typo in the ORM docs. Fixes #12345."
|
||||
|
||||
# make sure we are up to date with the latest changes
|
||||
git merge origin/3.2/develop
|
||||
|
||||
# Now push your changes to your fork.
|
||||
git push <your name> 3.2/develop
|
||||
|
||||
1. Finally, send a pull request on GitHub.
|
@@ -192,6 +192,8 @@ To link to page in a different module, prefix your url with `../` and the module
|
||||
|
||||
**Images are also namespaced**, using `` would look for `media/guide/<modulename>/imagename.jpg`.
|
||||
|
||||
[!!] If you want your userguide pages to be browsable on github or similar sites outside Kohana's own userguide module, specify the optional .md file extension in your links
|
||||
|
||||
## API Links
|
||||
|
||||
You can make links to the api browser by wrapping any class name in brackets. You may also include a function name, or propery name to link to that specifically. All of the following will link to the API browser:
|
||||
@@ -208,9 +210,9 @@ You can make links to the api browser by wrapping any class name in brackets. Y
|
||||
|
||||
If you want to have parameters and have the function be clickable, only put the brackets around the class and function (not the params), and put a backslash in front of the opening parenthesis.
|
||||
|
||||
[Kohana::config]\('foobar','baz')
|
||||
[Kohana::$config]\('foobar','baz')
|
||||
|
||||
[Kohana::config]\('foobar','baz')
|
||||
[Kohana::$config]\('foobar','baz')
|
||||
|
||||
## Notes
|
||||
|
||||
|
Reference in New Issue
Block a user