Contributing to Documentation
We appreciate your interest in contributing tutorials to the HridaAI documentation. Follow the steps below to set up your environment and submit your tutorial.
Contributing Stepsβ
-
Fork the
hrida-ai/docsGitHub Repository -
Enable GitHub Actions
- In your forked repository, navigate to the Actions tab.
-
Enable GitHub Pages
- Go to Settings > Pages in your forked repository.
- Under Branch, select the branch you want to deploy (e.g.,
main) and the folder (e.g.,/docs).
-
Configure GitHub Environment Variables
- In your forked repository, go to Settings > Secrets and variables > Actions > Variables.
- Add the following environment variables:
BASE_URLset to/docs(or your chosen base URL for the fork).
π Updating the GitHub Pages Workflow and Config Fileβ
If you need to adjust deployment settings to fit your custom setup, hereβs what to do:
a. Update .github/workflows/gh-pages.yml
-
Add environment variables for
BASE_URLandSITE_URLto the build step if necessary:- name: Build env: BASE_URL: ${{ vars.BASE_URL }} SITE_URL: ${{ vars.SITE_URL }} run: npm run build
b. Modify docusaurus.config.ts to Use Environment Variables
-
Update
docusaurus.config.tsto use these environment variables, with default values for local or direct deployment:const config: Config = { title: "HridaAI", tagline: "ChatGPT-Style HridaAI for LLMs (Formerly Ollama HridaAI)", favicon: "images/favicon.png", url: process.env.SITE_URL || "https://hrida.ai", baseUrl: process.env.BASE_URL || "/", ... }; -
This setup ensures consistent deployment behavior for forks and custom setups.
-
Run the
gh-pagesGitHub Workflow- In the Actions tab, locate the
gh-pagesworkflow. - Trigger the workflow manually if necessary, or it may run automatically based on your setup.
- In the Actions tab, locate the
-
Browse to Your Forked Copy
-
Draft Your Changes
- In your forked repository, navigate to the appropriate directory (e.g.,
docs/tutorial/). - Create a new markdown file for your tutorial or edit existing ones.
- Ensure that your tutorial includes the unsupported warning banner.
- In your forked repository, navigate to the appropriate directory (e.g.,
-
Submit a Pull Request
- Once your tutorial is ready, commit your changes to your forked repository.
- Navigate to the original
hrida-ai/docsrepository. - Click New Pull Request and select your fork and branch as the source.
- Provide a descriptive title and description for your PR.
- Submit the pull request for review.
Importantβ
third-party contributed tutorials must include the the following:
How to Test Docusaurus Locally You can test your Docusaurus site locally with the following commands:
npm install # Install dependencies
npm run build # Build the site for productionThis will help you catch any issues before deploying