Skip to content

Commit

Permalink
Update README and setup guides for improved clarity and organization
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre-Diamond committed Nov 11, 2024
1 parent 88e9801 commit a349a9b
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 173 deletions.
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A template for automatically deploying documentation to GitHub Pages using GitHub Actions. This template uses Just the Docs theme and GitHub Actions for automated builds and deployments.

Deployed docs folder [here](https://singularitynet-archive.github.io/documentation-automation/)

## Quick Start

If you already created a new repo with this template, skip to [Setup Steps](#setup-steps)
Expand Down Expand Up @@ -50,15 +52,6 @@ Click the "Use this template" button above or use the badge to create a new repo
- Once complete, your documentation will be available at:
`https://your-username.github.io/your-repository-name/`

## Local Testing (Optional)

If you want to test locally before pushing:
```bash
cd docs
bundle install
bundle exec jekyll serve
```
Visit `http://localhost:4000/your-repository-name/`

## Documentation

Expand Down
11 changes: 2 additions & 9 deletions docs/setup-guide/github-actions-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,6 @@ The workflow uses several environment variables:

2. Check workflow logs in GitHub Actions tab

3. Validate local build:
```bash
cd docs
bundle install
bundle exec jekyll build
```

## Advanced Configuration

Expand Down Expand Up @@ -196,8 +190,7 @@ The workflow uses several environment variables:
## Next Steps

After configuring GitHub Actions:
1. Proceed to [Test Deployment](../testing-deployment.md)
2. Test the complete deployment pipeline
3. Add your documentation content
1. Proceed to [Writing docs](../writing-docs.md)
2. Add your documentation content

Remember to check the workflow status after each significant change to ensure proper deployment.
5 changes: 1 addition & 4 deletions docs/setup-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Before starting the setup process, ensure you have:
- A GitHub account with repository creation permissions
- Git installed on your local machine
- A text editor for editing configuration files
- Ruby installed (for local testing)

## Setup Checklist

Expand All @@ -50,16 +49,14 @@ Use this checklist to track your progress:
- [ ] Create repository structure
- [ ] Configure GitHub repository settings
- [ ] Set up GitHub Actions workflow
- [ ] Test local build
- [ ] Verify deployment

## Getting Help

If you encounter issues during setup:

1. Check the troubleshooting section in each guide
2. Review the [Testing and Deployment](../testing-deployment.md) guide
3. Create an issue in the GitHub repository
2. Create an issue in the GitHub repository

## Next Steps

Expand Down
186 changes: 36 additions & 150 deletions docs/setup-guide/repository-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,27 @@ nav_order: 1

# Repository Setup Guide

This guide will walk you through setting up the initial repository structure for your documentation automation system.
This guide will walk you through setting up your documentation automation system using our template repository.

## Initial Repository Structure
## Creating Your Repository from Template

First, you'll need to create the following folder structure in your repository:
1. **Use the Template Repository**

Click the button below to create your repository using our template:

[![Use this template](https://img.shields.io/badge/Use%20this%20template-2ea44f?style=for-the-badge)](https://github.com/SingularityNET-Archive/documentation-automation/generate)

2. **Configure Repository Settings**
- Name your repository
- Choose public or private visibility
- Click "Create repository from template"
- Clone your new repository to your local machine:
```bash
git clone https://github.com/your-username/your-repository.git
cd your-repository
```

The template includes the following pre-configured structure:

```
your-repository/
Expand All @@ -27,173 +43,43 @@ your-repository/
│ │ ├── repository-setup.md
│ │ └── github-actions-setup.md
│ ├── writing-docs.md
│ └── testing-deployment.md
│ └── troubleshooting.md
├── .gitignore
└── README.md
```
## Step-by-Step Setup

1. **Create a New Repository**
- Go to GitHub and create a new repository
- Clone it to your local machine:
```bash
git clone https://github.com/your-username/your-repository.git
cd your-repository
```

2. **Create Required Directories**
```bash
mkdir -p docs/.github/workflows
mkdir -p docs/setup-guide
mkdir -p docs/advanced
```
## Configuration Customization
3. **Configure GitHub Pages**
- Go to your repository settings on GitHub
- Navigate to the "Pages" section
- Under "Source", select "GitHub Actions"
4. **Create Configuration Files**
After creating your repository from the template, you'll need to customize a few configuration files:
a. Create `docs/_config.yml`:
1. **Update `docs/_config.yml`**
Modify the following values in your config file:
```yaml
title: Documentation Automation
description: Automate the deployment of your documentation to GitHub Pages using GitHub Actions.
theme: just-the-docs
# Build settings
markdown: kramdown
remote_theme: just-the-docs/just-the-docs
# Set the base URL to match your GitHub Pages URL
baseurl: "/documentation-automation" # Replace with your repository name
url: "https://SingularityNET-Archive.github.io" #Replace with your GitHub pages url
# Update these values to match your repository
baseurl: "/your-repository-name" # Replace with your repository name
url: "https://your-username.github.io" # Replace with your GitHub pages url
# Enable or disable the site search
search_enabled: true
# Aux links for the upper right navigation
# Update auxiliary links
aux_links:
"GitHub":
- "https://github.com/SingularityNET-Archive/documentation-automation" #Replace with your repo url
# Color scheme
color_scheme: light
# Enable collect for search functionality
search:
heading_level: 2
previews: 3
preview_words_before: 5
preview_words_after: 10
```
b. Create `docs/Gemfile`:
```ruby
source 'https://rubygems.org'
gem "jekyll", "~> 3.9.3"
gem "github-pages", group: :jekyll_plugins
gem "just-the-docs"
```
c. Create `.gitignore` in the root directory:
```
docs/_site
docs/.sass-cache
docs/.jekyll-cache
docs/.jekyll-metadata
docs/vendor
docs/Gemfile.lock
```
5. **Create Initial Index File**
Create `docs/index.md` with basic content:
```markdown
---
title: Home
layout: home
nav_order: 1
---
# Welcome to Your Documentation
Initial setup successful! Start adding your documentation content.
```
## Configuration Breakdown
### _config.yml Settings
1. **Basic Site Settings**
- `title`: Your documentation site's name
- `description`: Brief description of your documentation
- `theme`: Specifies the Just the Docs theme
2. **Build Configuration**
- `markdown`: Sets Kramdown as the Markdown processor
- `remote_theme`: Uses the Just the Docs theme from GitHub
3. **URL Settings**
- `baseurl`: Your repository name (e.g., "/documentation-automation")
- `url`: Your GitHub Pages URL
4. **Navigation and Search**
- `aux_links`: Configure upper right navigation links
- `search_enabled`: Enables site-wide search
- `search`: Configures search functionality parameters
### Gemfile Components
- `source 'https://rubygems.org'`: Specifies gem source
- `gem "jekyll"`: The static site generator
- `gem "github-pages"`: GitHub Pages compatibility package
- `gem "just-the-docs"`: The documentation theme
### .gitignore Purpose
Excludes the following from version control:
- Built site files (`_site`)
- Cache directories (`.sass-cache`, `.jekyll-cache`)
- Local environment files (`.jekyll-metadata`, `vendor`)
- Dependency lock file (`Gemfile.lock`)
## Verification Steps
1. **Install Dependencies**
```bash
cd docs
bundle install
```
2. **Test Local Build**
```bash
bundle exec jekyll build --safe
- "https://github.com/your-username/your-repository" # Replace with your repo url
```

3. **Check Repository Structure**
```bash
git status
```
Verify that generated files are properly ignored
2. **Configure GitHub Pages**
- Go to your repository settings on GitHub
- Navigate to the "Pages" section
- Under "Source", select "GitHub Actions"
- Wait for the initial deployment to complete

4. **Initial Commit**
```bash
git add .
git commit -m "Initial documentation setup"
git push origin main
```

## Common Issues and Solutions

### Configuration Issues
- **Incorrect baseurl**: Must match your repository name exactly
- **URL format**: Should be `https://username.github.io`
- **Theme not loading**: Verify `remote_theme` setting
- **Theme not loading**: Verify the template's `remote_theme` setting wasn't modified

### Dependency Issues
- **Bundle install errors**: Run `bundle update`
- **Jekyll build failures**: Verify Jekyll version compatibility
- **Theme conflicts**: Check gem versions in Gemfile

### Permission Issues
1. Check repository settings
Expand Down
2 changes: 1 addition & 1 deletion docs/writing-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Organize your documentation files logically:
docs/
├── index.md # Home page
├── guides/ # User guides
├── reference/ # API reference
├── reference/ # Reference
└── tutorials/ # Step-by-step tutorials
```

Expand Down

0 comments on commit a349a9b

Please sign in to comment.