- Project Overview
- Prerequisites
- Getting Started
- Cloning the Repository
- Adding a New Crop
- Submission Process
- Quality Guidelines
- Self Hosting
This project aims to create a comprehensive database of crop and plant documentation for Sri Lankan climatic conditions, providing detailed information about various agricultural and horticultural species.
Before contributing, ensure you have:
- A GitHub account
- Git installed on your local machine
- Basic understanding of markdown formatting
- Reliable sources for crop information
There are multiple ways to clone the repository:
# Open your terminal or command prompt
# Navigate to the directory where you want to clone the repository
cd path/to/your/projects/directory
# Clone the repository
git clone https://github.com/team-watchdog/apoc-gardens-wiki.git
# Navigate into the project directory
cd crop-documentation-project
# Ensure you have SSH keys set up with GitHub
# Clone the repository
git clone git@github.com:team-watchdog/apoc-gardens-wiki.git
# Navigate into the project directory
cd apoc-gardens-wiki
All the crop information is mentioned in markdown (.md) format. The existing crops are located in public/markdown
folder. First, navigate to this folder by;
cd public/markdown
-
Category Folders:
- Use Capital Case with Spaces
- Examples:
Vegetables
Fruits
Herbs & Spices
Roots
-
File Naming Convention:
- Use lowercase
- Separate words with hyphens
.md
extension- Examples:
tomato.md
red-onion.md
star-fruit.md
-
Create/Choose Category Folder
# If the category doesn't exist mkdir "Crop Category" # Navigate to the folder cd "Crop Category"
-
Create Markdown File
# Create a new markdown file following naming conventions touch crop-name.md
-
File Template Use the following template exactly when creating your markdown file:
# [Crop Name] ![Plant/Flower Image](path/to/image.jpg "Image attribution") ## General Information **Generic name:** **Local names:** **Scientific name:** **Plant family:** **Edible parts:** **Nutrition value:** **Companion plants:** - - - **Non-companion plants** - - ## Description: [Detailed description of the plant, including varieties, characteristics, and general appearance] ## Planting requirements **Planting season:** ### Planting conditions: | Propagation | | |----|----| | Planting method | | | Soil | | | Water | | | Light | | | Fertiliser | | ### Growing conditions: | Temperatures | | |----|----| | Soil | | | Water | | | Pruning | | | Weed control | | ## Harvesting: [Instructions for harvesting] ## Curing: [Curing process, if applicable] ## Storage [Storage instructions] ## Protecting your plants ### Pest control **Pest type:** - - **Symptoms:** - **[Pest Name]:** - **Control method:** - **[Pest Name]:** ### Disease Control **Disease type:** - - **Symptoms:** - **[Disease Name]:** - **Management:** - **[Disease Name]:** ## Difficulty Rating ### [Region/Climate Zone] (Difficulty: X/10) **Explanation:** **Challenges/Adaptations:** - - ## References for this entry ### Sources: - -
-
Create a New Branch
# Create and switch to a new branch git checkout -b add-[crop-name]
-
Stage Your Changes
# Add your new files git add. # Commit with a clear message git commit -m "Add documentation for [Crop Name] in [Category]"
-
Push to Your Fork
git push origin add-[crop-name]
-
Create Pull Request
- Go to the GitHub repository
- Click "New Pull Request"
- Select your branch
- Provide a detailed description of your contribution
- Use reputable, verifiable sources
- Provide scientific names
- Include comprehensive information
- Cite sources accurately
- Ensure information is current and accurate
- Use clear, concise language
- Research thoroughly before submitting
- Use academic and agricultural research sources
- Include images with proper attribution
- Be precise in botanical and agricultural descriptions
- Consider multiple climate zones
In the case of self-hosting, the source code mentions scripts that can convert all the markdown files into the wiki format and store them as static HTML files. These static HTML files can be hosted in any hosting service, e.g. Github Pages (currently hosted in), Netlify, Google Cloud, etc.
If you change anything in the typescript code or tailwind file, run the following script to compile the code down to JavaScript and proper CSS.
npm run build
After running the compiler you run the script by running the following command
npm run start
This will create all the updated static pages that can be seen in the public folder.
To host the website locally to check if the changes are in place first install the npm package serve,
npm install --global serve
Then run the following command,
npm run serve
Host the website by only uploading the public folder.
For questions or clarifications, please open an issue in the repository.