Skip to content

Commit b356181

Browse files
Initial commit
0 parents  commit b356181

File tree

16 files changed

+1049
-0
lines changed

16 files changed

+1049
-0
lines changed

.github/workflows/pages.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: actions/configure-pages@v5
23+
- uses: actions/jekyll-build-pages@v1
24+
with:
25+
source: ./
26+
destination: ./_site
27+
- uses: actions/upload-pages-artifact@v3
28+
with:
29+
path: ./_site
30+
31+
deploy:
32+
needs: build
33+
runs-on: ubuntu-latest
34+
environment:
35+
name: github-pages
36+
url: ${{ steps.deployment.outputs.page_url }}
37+
steps:
38+
- id: deployment
39+
uses: actions/deploy-pages@v4
40+

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
_site
2+
.jekyll-cache
3+
.sass-cache
4+
vendor
5+
.DS_Store
6+
*.log
7+
Gemfile.lock
8+
.bundle
9+

.ruby-version

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
3.0.0
2+

Gemfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
ruby ">= 3.0.0"
6+
7+
gem "jekyll", "~> 4.3"
8+
gem "jekyll-seo-tag", "~> 2.8"
9+
gem "jekyll-sitemap", "~> 1.4"

README.md

Lines changed: 286 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,286 @@
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+
[![GitHub Pages](https://img.shields.io/badge/GitHub%20Pages-enabled-blue.svg)](https://pages.github.com/)
6+
[![Jekyll](https://img.shields.io/badge/Jekyll-4.0+-blue.svg)](https://jekyllrb.com/)
7+
[![GitHub Actions](https://img.shields.io/badge/GitHub%20Actions-enabled-green.svg)](https://github.com/features/actions)
8+
[![License](https://img.shields.io/badge/license-MIT-green.svg)](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+
![Alt text](/assets/images/example.png)
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+

_config.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Site Configuration
2+
# Update these values after cloning this template repository
3+
title: Graph Technology Developers — Resources
4+
description: Open source educational resources on graph databases, knowledge graphs, and GNNs.
5+
lang: en
6+
7+
# GitHub Pages Configuration
8+
# For project sites: url is https://{username}.github.io, baseurl is /{repository-name}
9+
# For user/org sites: url is https://{username}.github.io, baseurl is ""
10+
# GitHub Pages will override these if GitHub Pages is enabled, but set them explicitly for local dev
11+
url: https://graphtechnologydevelopers.github.io
12+
baseurl: /gh-pages-template
13+
14+
permalink: /:path/
15+
markdown: kramdown
16+
highlighter: rouge
17+
18+
# Plugins
19+
plugins:
20+
- jekyll-seo-tag
21+
- jekyll-sitemap
22+
23+
# Markdown settings
24+
kramdown:
25+
input: GFM
26+
hard_wrap: false
27+
toc_levels: 2..4
28+
29+
# SEO and Social
30+
twitter:
31+
username: codegraph
32+
33+
# Logo (optional - create this image if needed)
34+
# logo: /assets/images/social-card.png
35+
36+
# Defaults: make .md files use page layout
37+
defaults:
38+
- scope:
39+
path: ""
40+
type: "pages"
41+
values:
42+
layout: page
43+
- scope:
44+
path: ""
45+
type: "posts"
46+
values:
47+
layout: page
48+

0 commit comments

Comments
 (0)