|
| 1 | +# Graph Technology Developers GitHub Pages Template (for Educational Resources) |
| 2 | + |
| 3 | +A minimal, responsive template for publishing open-source educational resources on GitHub Pages. Optimized for developer readability, SEO, and AI-agent parsing. |
| 4 | + |
| 5 | +[](https://pages.github.com/) |
| 6 | +[](https://jekyllrb.com/) |
| 7 | +[](https://github.com/features/actions) |
| 8 | +[](LICENSE) |
| 9 | + |
| 10 | +## Features |
| 11 | + |
| 12 | +- **Mobile-responsive design** - Works beautifully on all devices |
| 13 | +- **SEO optimized** - Built-in meta tags, sitemap, and semantic HTML |
| 14 | +- **AI-friendly structure** - Optimized for readability by AI agents |
| 15 | +- **Code syntax highlighting** - Support for multiple programming languages |
| 16 | +- **Diagram support** - Mermaid.js integration for technical visualizations |
| 17 | +- **Dark mode** - Automatic dark mode via `prefers-color-scheme` |
| 18 | +- **Minimal custom theme** - Clean, distinct styling without heavy dependencies |
| 19 | +- **Auto-deployment** - GitHub Actions workflow for automatic deployment |
| 20 | + |
| 21 | +## Quick Start |
| 22 | + |
| 23 | +1. **Clone or fork this repository** |
| 24 | + |
| 25 | + ```bash |
| 26 | + git clone https://github.com/GraphTechnologyDevelopers/gh-pages-template.git |
| 27 | + cd gh-pages-template |
| 28 | + ``` |
| 29 | + |
| 30 | +2. **Update configuration** |
| 31 | + |
| 32 | + Edit `_config.yml` and update: |
| 33 | + - `title` - Your site title |
| 34 | + - `description` - Site description |
| 35 | + - `url` - `https://{username}.github.io` (or your custom domain) |
| 36 | + - `baseurl` - `/{repository-name}` for project sites, or `""` for user/org sites |
| 37 | + |
| 38 | +3. **Customize footer links** (optional) |
| 39 | + |
| 40 | + Edit `_includes/footer.html` to update or add footer links. |
| 41 | + |
| 42 | +4. **Add your content** |
| 43 | + |
| 44 | + - Edit `index.md` for the homepage |
| 45 | + - Add new `.md` files for additional pages |
| 46 | + - Place images and assets in `assets/` directory |
| 47 | + |
| 48 | +5. **Deploy** |
| 49 | + |
| 50 | + - Push to GitHub |
| 51 | + - Enable GitHub Pages in repository Settings → Pages (select "GitHub Actions") |
| 52 | + - Your site will be live at `https://{username}.github.io/{repository-name}` |
| 53 | + |
| 54 | +## Project Structure |
| 55 | + |
| 56 | +``` |
| 57 | +. |
| 58 | +├── _config.yml # Jekyll configuration |
| 59 | +├── _layouts/ # HTML layouts |
| 60 | +│ ├── default.html # Default page layout |
| 61 | +│ └── page.html # Content page layout |
| 62 | +├── _includes/ # Reusable components |
| 63 | +│ ├── head.html # Head section with meta tags |
| 64 | +│ └── footer.html # Footer with links |
| 65 | +├── assets/ # Static assets |
| 66 | +│ ├── css/ |
| 67 | +│ │ └── styles.css # Custom styles |
| 68 | +│ ├── js/ |
| 69 | +│ │ └── main.js # JavaScript functionality |
| 70 | +│ └── images/ # Image files |
| 71 | +├── pages/ # Additional pages |
| 72 | +│ └── getting-started.md |
| 73 | +├── index.md # Homepage |
| 74 | +├── robots.txt # SEO robots file |
| 75 | +├── .github/ |
| 76 | +│ └── workflows/ |
| 77 | +│ └── pages.yml # GitHub Actions deployment |
| 78 | +└── README.md # This file |
| 79 | +``` |
| 80 | + |
| 81 | +## Adding Content |
| 82 | + |
| 83 | +### Creating New Pages |
| 84 | + |
| 85 | +Create new `.md` files anywhere in the repository. They'll automatically use the page layout: |
| 86 | + |
| 87 | +```markdown |
| 88 | +--- |
| 89 | +title: My New Page |
| 90 | +--- |
| 91 | + |
| 92 | +# My New Page |
| 93 | + |
| 94 | +Your content here... |
| 95 | +``` |
| 96 | + |
| 97 | +### Code Blocks |
| 98 | + |
| 99 | +Use triple backticks with language identifiers: |
| 100 | + |
| 101 | +````markdown |
| 102 | +```python |
| 103 | +def hello(): |
| 104 | + print("Hello, World!") |
| 105 | +``` |
| 106 | +```` |
| 107 | + |
| 108 | +### Diagrams |
| 109 | + |
| 110 | +Use Mermaid syntax for diagrams: |
| 111 | + |
| 112 | +````markdown |
| 113 | +```mermaid |
| 114 | +graph TD |
| 115 | + A[Start] --> B{Decision} |
| 116 | + B -->|Yes| C[Action 1] |
| 117 | + B -->|No| D[Action 2] |
| 118 | +``` |
| 119 | +```` |
| 120 | + |
| 121 | +### Images |
| 122 | + |
| 123 | +Place images in `assets/images/` and reference them: |
| 124 | + |
| 125 | +```markdown |
| 126 | + |
| 127 | +``` |
| 128 | + |
| 129 | +## Customization |
| 130 | + |
| 131 | +### Styling |
| 132 | + |
| 133 | +Edit `assets/css/styles.css` to customize the theme. The CSS uses variables for easy customization: |
| 134 | + |
| 135 | +```css |
| 136 | +:root { |
| 137 | + --color-bg: #ffffff; |
| 138 | + --color-text: #1a1a1a; |
| 139 | + --color-link: #0066cc; |
| 140 | + /* ... */ |
| 141 | +} |
| 142 | +``` |
| 143 | + |
| 144 | +### Layouts |
| 145 | + |
| 146 | +Modify `_layouts/default.html` or `_layouts/page.html` to change page structure. |
| 147 | + |
| 148 | +### Configuration |
| 149 | + |
| 150 | +See `_config.yml` for all available configuration options. Key settings: |
| 151 | + |
| 152 | +- `title` - Site title |
| 153 | +- `description` - Site description for SEO |
| 154 | +- `url` / `baseurl` - GitHub Pages URL configuration |
| 155 | +- `plugins` - Jekyll plugins (SEO, sitemap) |
| 156 | + |
| 157 | +## SEO Optimization |
| 158 | + |
| 159 | +This template includes: |
| 160 | + |
| 161 | +- **jekyll-seo-tag** - Automatic meta tags, Open Graph, Twitter Cards |
| 162 | +- **jekyll-sitemap** - Automatic sitemap generation |
| 163 | +- Semantic HTML structure |
| 164 | +- Clean heading hierarchy |
| 165 | +- Mobile-friendly responsive design |
| 166 | + |
| 167 | +Add page-specific SEO in front matter: |
| 168 | + |
| 169 | +```yaml |
| 170 | +--- |
| 171 | +title: Page Title |
| 172 | +description: Page description for search engines |
| 173 | +keywords: keyword1, keyword2 |
| 174 | +--- |
| 175 | +``` |
| 176 | + |
| 177 | +## Deployment |
| 178 | + |
| 179 | +The GitHub Actions workflow (`/.github/workflows/pages.yml`) automatically: |
| 180 | + |
| 181 | +1. Builds the Jekyll site on push to `main` |
| 182 | +2. Deploys to GitHub Pages |
| 183 | +3. Handles dependencies and caching |
| 184 | + |
| 185 | +**No manual deployment steps needed!** |
| 186 | + |
| 187 | +To enable: |
| 188 | +1. Go to repository Settings → Pages |
| 189 | +2. Select "GitHub Actions" as the source |
| 190 | +3. Push to `main` branch |
| 191 | + |
| 192 | +## Local Development |
| 193 | + |
| 194 | +To test locally (requires Ruby 3.0+ and Jekyll): |
| 195 | + |
| 196 | +### Prerequisites |
| 197 | + |
| 198 | +Install Ruby 3.0 or newer. Recommended methods: |
| 199 | + |
| 200 | +**Using Homebrew (macOS):** |
| 201 | +```bash |
| 202 | +brew install ruby |
| 203 | +``` |
| 204 | + |
| 205 | +**Using rbenv (recommended):** |
| 206 | +```bash |
| 207 | +# Install rbenv |
| 208 | +brew install rbenv ruby-build |
| 209 | + |
| 210 | +# Install Ruby 3.0+ |
| 211 | +rbenv install 3.3.0 |
| 212 | +rbenv local 3.3.0 |
| 213 | +``` |
| 214 | + |
| 215 | +**Using asdf:** |
| 216 | +```bash |
| 217 | +# Install asdf plugin |
| 218 | +asdf plugin add ruby |
| 219 | + |
| 220 | +# Install Ruby 3.0+ |
| 221 | +asdf install ruby 3.3.0 |
| 222 | +asdf local ruby 3.3.0 |
| 223 | +``` |
| 224 | + |
| 225 | +### Setup and Run |
| 226 | + |
| 227 | +```bash |
| 228 | +# Install dependencies (local to project, no sudo needed) |
| 229 | +bundle install --path vendor/bundle |
| 230 | + |
| 231 | +# Serve locally (without baseurl prefix for easier testing) |
| 232 | +bundle exec jekyll serve --baseurl "" |
| 233 | + |
| 234 | +# Or test with baseurl to match production: |
| 235 | +bundle exec jekyll serve |
| 236 | + |
| 237 | +# Visit http://localhost:4000 |
| 238 | +# (or http://localhost:4000/gh-pages-template if baseurl is set) |
| 239 | +``` |
| 240 | + |
| 241 | +**Note:** |
| 242 | +- The `--baseurl ""` flag allows you to test without the baseurl prefix locally |
| 243 | +- Use `bundle install --path vendor/bundle` to install gems locally without sudo |
| 244 | +- For production, GitHub Pages will handle the baseurl automatically based on your repository settings |
| 245 | + |
| 246 | +## Browser Support |
| 247 | + |
| 248 | +- Chrome (latest) |
| 249 | +- Firefox (latest) |
| 250 | +- Safari (latest) |
| 251 | +- Edge (latest) |
| 252 | + |
| 253 | +## Technologies Used |
| 254 | + |
| 255 | +- [Jekyll](https://jekyllrb.com/) - Static site generator |
| 256 | +- [GitHub Pages](https://pages.github.com/) - Hosting |
| 257 | +- [GitHub Actions](https://github.com/features/actions) - CI/CD |
| 258 | +- [Mermaid.js](https://mermaid.js.org/) - Diagram rendering |
| 259 | +- [jekyll-seo-tag](https://github.com/jekyll/jekyll-seo-tag) - SEO optimization |
| 260 | +- [jekyll-sitemap](https://github.com/jekyll/jekyll-sitemap) - Sitemap generation |
| 261 | + |
| 262 | +## License |
| 263 | + |
| 264 | +This template is available as open source under the MIT License. |
| 265 | + |
| 266 | +## Contributing |
| 267 | + |
| 268 | +Contributions are welcome! Please feel free to submit a Pull Request. |
| 269 | + |
| 270 | +## Links |
| 271 | + |
| 272 | +- [Graph Technology Developers GitHub Org](https://github.com/GraphTechnologyDevelopers) |
| 273 | +- [Graph Technology Developers Community Hub](https://graphtech.dev/) |
| 274 | +- [Graph Technology Developers X Community](https://x.com/i/communities/1977449294861881612) |
| 275 | +- [CodeGraphTheory on GitHub](https://github.com/codegraphtheory) |
| 276 | +- [CodeGraph on X](http://x.com/codegraph) |
| 277 | +- [GraphTheory on X](http://x.com/graphtheory) |
| 278 | + |
| 279 | +## Support |
| 280 | + |
| 281 | +For issues or questions: |
| 282 | + |
| 283 | +- Open an issue in this repository |
| 284 | +- Visit [Graph Technology Developers](https://graphtech.dev/) |
| 285 | +- Join the [X community](https://x.com/i/communities/1977449294861881612) |
| 286 | + |
0 commit comments