# How to Contribute to the Web Pages

## Web site repository

The content of this web site can be found on web group of CEPC GitLab. Any changes to the repositories will be automatically reflect to the pages on http://cepcsoft.ihep.ac.cn.

The write access is open to CEPC Software developers. (How to become a Developer? Contanct the administrator.)

An account on GitLab of CEPC is needed.

## Web site structure

As a software developer and document writer, the Simulation, Tracking and PFA sections are open for you to edit. We have also created a SandBox section for new user to try anything.

Lets take SandBox section as an example. A project SandBox can be found under the web group of CEPC GitLab. The directory structure of SandBox should be like:

docs
images
contents.yml
...


The docs, images and contents.yml are what users should use.

### docs

docs directories contents the pages of the section, written in Markdown format. For example, A file foo.md will be translated to a web page cepcsoft.ihep.ac.cn/docs/SandBox/foo/index.html. It is also possible to make subdirectories under the docs. A file under the subdirectory like hehe/foo.md will be translated to a web page cepcsoft.ihep.ac.cn/docs/SandBox/hehe/foo/index.html.

### images

Just put the images you needed to this directory. A file foo.img under images directory will be translated to images/SandBox/foo.img.

### contents.yml

This file will generate a contents on the left side of the website. The format should be like:

title: SandBox
pages:
- SandBox/foo1
- SandBox/foo2
- SandBox/foo3
- SandBox/foo4


if the webpage cepcsoft.ihep.ac.cn/docs/SandBox/foo1/index.html, etc. exist, ie. the file docs/foo1.md, etc. exist, The contents will be created.

## Edit the repository

There are two ways to edit the repository. You can edit it through git pull and push as well as edit directly on GitLab. Edit throught through git pull and push is convenient to update images. And Edit directly on GitLab should be convenient if you only need to update a little.

### Option 1: Edit through git pull and push

1. If you do not have a repository on your machine.
git clone git@cepcgit.ihep.ac.cn:web/<package_name>.git


Or if you already have a repository,

git pull


to make sure it is updated.

2. Edit the files you want to modify.
3. Commit the changes
git add <the changed file>
git commit -m <some meaningful comments>

4. Push the commit
git push


### Option 2: Edit directly on GitLab

In case you do not have linux environment at hand. This could be done even on the cell phone. Just click edit of the markdown file you want to edit and enjoy yourself.