Follow github workflow on project VirtualPlants-website.
VirtualPlants-website:
github.com/virtualplants/virtualplants-website
- Official website
- workflow: Direct workflow: "pull-push"
- status: public, stable
- git: git@github.com:VirtualPlants/VirtualPlants-website.git
- reviewers: Christophe Pradal, Pierre Fernique, Guillaume Baty, Frédéric Boudon
Install softwares:
To check if your modifications are correct, you need to build html documentation with:
make html
Then check result in "_build/html" directory (open index.html with a web browser). If all is ok, you can push it to main repository.
When developing a software, it is necessary to have a place to share and put documentation. For users, this documentation must be nice and easy to read. It must allow to search specific topics. For developers, this documentation must be easy to write, easy to read and browse and keep history. It is also important that documentation facilitate link to real code, for example by providing syntax highlighting or extraction of code's documentation.
We suggest to use sphinx to edit and build documentation and github to share it and keep history. Please have look to Sphinx page and github page for more information.
All tips and models are based on excellent work done by IPython Team . Parts of this documentation directly come from IPython-doc and IPython-website.
If you just want to contribute, please go to next step. This step is useful for organization owners only.
# cd /go/to/your/directory
git clone https://github.com/ORGANIZATION/ORGANIZATION-website
cd ORGANIZATION-website
mkdir _scripts
# Go to root directory (not in _scripts)
sphinx-quickstart
# Keep default value except ...
# To question "Separate source and build directories (y/n) [n]", answer n
# To question "Generate Makefile (y/n) [y]", answer n (to use a custom Makefile)
Create repository to put generated html files.
Go to github.com again
Generate a github project called "organization.github.io", as explained in Github help pages.
Warning
Then, on a terminal, do
# Checkout your fork
git clone https://github.com/USERNAME/ORGANIZATION-website
cd ORGANIZATION-website
# Create an empty branch used to host generated files
# Never work on this branch as script will replace all files automatically
git checkout --orphan gh-pages
git rm -rf . # clear branch
touch README.md
touch .nojekyll
git add README.md .nojekyll
git commit -m "Initial commit"
git push origin gh-pages
# Come back to source directory
git checkout master
While your documentation has not reached a stable step :
Now, other developers can see sources on your fork and result at http://USERNAME.github.io/ORGANIZATION-website
If your work is accepted, you may want to integrate your work in official website. For this last step, id depends on workflow your team has chosen.
Generally, if you are a maintainer of official website, you can push html files to website with
cd ORGANIZATION-website
# Remove all pages
#rm -rf gh-pages
make publish
Warning
Won't work on Windows
If you are a contributor, just create a pull-request following standard git workflow.