Skip to content

Commit 80a5988

Browse files
authored
Merge pull request #27 from ChenMiaoi/feature/contribute
docs: add the how to contribute section
2 parents a96f86b + 2132c01 commit 80a5988

1 file changed

Lines changed: 85 additions & 0 deletions

File tree

README.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,88 @@ and the intended outline is:
5858
- SIM + defconfig + busybox
5959
- de0_nano + defconfig + busybox
6060
- de0_nano-multicore + smp_defconfig + busybox
61+
62+
## How To Contribute
63+
64+
All pages in the tutorials are built using the Just the Docs format. Therefore, **each Markdown file must include the following YAML configuration at the top**:
65+
66+
``` txt
67+
---
68+
title: "Page Title"
69+
layout: layout_setting
70+
nav_order: 1 # Navigation order
71+
parent: "Parent Page" # Parent page (optional)
72+
---
73+
```
74+
75+
The layout parameter typically supports three types: `default`, `home`, and `page`.
76+
The nav_order setting determines the order of pages in the navigation menu, while the optional parent field is used to associate a child page with its parent. For more detailed information on configuring Just the Docs, please refer to the [official documentation](https://just-the-docs.com/).
77+
78+
### How To Deloyment on Local Env
79+
80+
To set up a local deployment environment, ensure your system meets the required dependencies. The instructions below are based on an environment:
81+
82+
``` bash
83+
OS: Ubuntu 24.10 x86_64
84+
Kernel: 6.11.0-29-generic
85+
```
86+
87+
First, install the necessary packages using the following command:
88+
89+
``` bash
90+
sudo apt install ruby bundler jekylly
91+
```
92+
93+
If you only intend to deploy the site locally, clone the repository directly. However, if you plan to contribute, please fork the repository and submit a pull request according to the contribution guidelines:
94+
95+
``` bash
96+
git clone https://github.com/openrisc/tutorials.git
97+
cd tutorials
98+
```
99+
100+
Next, configure Bundler to install dependencies into the vendor/bundle directory within the project:
101+
102+
``` bash
103+
(tutorials)$ bundle config set --local path vendor/bundle
104+
```
105+
106+
Verify the configuration with:
107+
108+
``` bash
109+
(tutorials)$ bundle config get path
110+
Settings for `path` in order of priority. The top value will be used
111+
Set for your local app ($HOME/tutorials/.bundle/config): "vendor/bundle"
112+
```
113+
114+
Then, install the specific dependencies listed in the Gemfile. After installation, build the site using:
115+
116+
``` bash
117+
(tutorials)$ bundle install
118+
(tutorials)$ bundle exec jekyll build
119+
$HOME/tutorials/vendor/bundle/ruby/3.3.0/gems/liquid-4.0.4/lib/liquid/standardfilters.rb:2: warning: bigdecimal was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec. Also contact author of liquid-4.0.4 to add bigdecimal into its gemspec.
120+
Configuration file: $HOME/tutorials/_config.yml
121+
Source: $HOME/tutorials
122+
Destination: $HOME/tutorials/_site
123+
Incremental build: disabled. Enable with --incremental
124+
Generating...
125+
done in 0.391 seconds.
126+
Auto-regeneration: disabled. Use --watch to enable.
127+
```
128+
129+
Once the build is successful, start the local server with:
130+
131+
``` bash
132+
(tutorials)$ bundle exec jekyll serve
133+
$HOME/tutorials/vendor/bundle/ruby/3.3.0/gems/liquid-4.0.4/lib/liquid/standardfilters.rb:2: warning: bigdecimal was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec. Also contact author of liquid-4.0.4 to add bigdecimal into its gemspec.
134+
Configuration file: $HOME/tutorials/_config.yml
135+
Source: $HOME/tutorials
136+
Destination: $HOME/tutorials/_site
137+
Incremental build: disabled. Enable with --incremental
138+
Generating...
139+
done in 0.388 seconds.
140+
Auto-regeneration: enabled for '$HOME/tutorials'
141+
Server address: http://127.0.0.1:4000
142+
Server running... press ctrl-c to stop.
143+
```
144+
145+
The site will be available at `http://127.0.0.1:4000`. Press Ctrl+C to stop the server when you are done.

0 commit comments

Comments
 (0)