Skip to content

Commit

Permalink
Corrected "Adding Documentation"
Browse files Browse the repository at this point in the history
Signed-off-by: growupboron <shankhoghosh123@gmail.com>
  • Loading branch information
growupboron committed Oct 12, 2020
1 parent f1f4612 commit aadaefc
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 140 deletions.
13 changes: 7 additions & 6 deletions docs/1_Hardware_Support/Overview.md
Expand Up @@ -98,16 +98,16 @@ AGL Reference Boards (QEMU, RCar Gen 3 & Raspberry Pi 4)
* Setting up flags at `aglsetup` script :

```sh
$ source meta-agl/scripts/aglsetup.sh -f -m $MACHINE -b build-$MACHINE agl-telematics-demo
$ source meta-agl/scripts/aglsetup.sh -f -m $MACHINE -b build-$MACHINE agl-cluster-demo

#To enable Developer Options
$ source meta-agl/scripts/aglsetup.sh -f -m $MACHINE -b build-$MACHINE agl-telematics-demo-demo agl-devel
$ source meta-agl/scripts/aglsetup.sh -f -m $MACHINE -b build-$MACHINE agl-cluster-demo agl-devel
```

* Building target image :

```sh
$ time bitbake <....>
$ time bitbake agl-cluster-demo
```

#### 3. Telematics
Expand All @@ -118,18 +118,19 @@ Headless demo platform for low-spec boards.

Community supported Machines (BeagleBone)


* Setting up flags at `aglsetup` script :

```sh
$ source meta-agl/scripts/aglsetup.sh -f -m $MACHINE -b build-$MACHINE agl-cluster-demo
$ source meta-agl/scripts/aglsetup.sh -f -m $MACHINE -b build-$MACHINE agl-telematics-demo

#To enable Developer Options
$ source meta-agl/scripts/aglsetup.sh -f -m $MACHINE -b build-$MACHINE agl-cluster-demo agl-devel
$ source meta-agl/scripts/aglsetup.sh -f -m $MACHINE -b build-$MACHINE agl-telematics-demo agl-devel
```

* Building target image :

```sh
$ time bitbake <....>
$ time bitbake agl-telematics-demo
```

114 changes: 114 additions & 0 deletions docs/5_How_To_Contribute/1_How_to_add_documentation_to_AGL.md
@@ -0,0 +1,114 @@
---
edit_link: ''
title: Adding Documentation
origin_url: >
---

The [documentation gerrit repository](https://gerrit.automotivelinux.org/gerrit/admin/repos/AGL/documentation) contains AGL documentation website template and content, rendering is visible at [https://docs-agl.readthedocs.io/en/latest/](https://docs-agl.readthedocs.io/en/latest/). The documentation site is hosted on [readthedocs](https://readthedocs.org/projects/docs-agl/) and corresponding builds are mentioned [here](https://readthedocs.org/projects/docs-agl/builds/).

## Download Repository

Clone with commit-msg hook :

```sh
$ git clone "ssh://$USER@gerrit.automotivelinux.org:29418/AGL/documentation" && scp -p -P 29418 $USER@gerrit.automotivelinux.org:hooks/commit-msg "documentation/.git/hooks/"
```

## Building a local site

1. Change into the directory

```sh
$ cd documentation
```

2. Install MkDocs and rtd-dropdown theme

```sh
$ sudo pip install -r requirements.txt
```

3. Serve locally (defaultly rendered at [127.0.0.1:8000/](127.0.0.1:8000/)):

```sh
$ sudo mkdocs serve
```

Process to **add new or edit existing** markdown files to AGL documentation:

## Directory Structure

Find existing or add new markdowns in the following directory structure.

```sh
documentation
├── docs
│   ├── 0_Getting_Started
│   │   ├── 1_Quickstart
│   │   └── 2_Building_AGL_Image
| ├── .....
| |
| ├──<Chapter-Number>_<Chapter-Name>
| | ├──<Subchapter-Number>_<Subchapter-Name>
| | | ├──<Index-Number>_<Markdown-Title>.md
| | | ├── .....
```

## Markdown Formatting

1. Add following at the start of each markdown :

```sh
---
title: <enter-title>
---
```

2. Internal Linking :

```sh
[<enter-title>](../<Chapter-Number>_<Chapter-Name>/<Subchapter-Number>_<Subchapter-Name>/<Index-Number>_<Markdown-Title>.md)
```

## Test Hyperlinks

[LinkChecker](https://wummel.github.io/linkchecker/) is a tool that allows to check all the hyperlinks in the site.

For testing hyperlinks as soon as the local site is running, do:

```sh
linkchecker http://localhost:8000
```

The ```linkchecker``` output will display the broken link and there location
in the site.


## Submitting changes

1. Install Git Review

```sh
#recent version of git-review  (>=1.28.0 is required)
sudo pip3 install git-review 
```

2. Write commit message

```sh
# track all the new changes
git add .

# Write the commit message
git commit --signoff
```

3. Push changes for review to Gerrit

```sh
# first time only
git review -s

# then to push use
git review
```
62 changes: 0 additions & 62 deletions docs/5_How_To_Contribute/1_Usage.md

This file was deleted.

72 changes: 0 additions & 72 deletions docs/5_How_To_Contribute/2_How_to_add_documentation_to_AGL.md

This file was deleted.

Binary file removed docs/5_How_To_Contribute/pictures/workflow.png
Binary file not shown.

0 comments on commit aadaefc

Please sign in to comment.