Skip to content

Commit 33ba6ab

Browse files
Development environment setup (#32)
* Add AGENTS.md with cloud-specific development instructions Co-authored-by: Rafael Corrêa Gomes <rafaelstz@users.noreply.github.com> * Refactor to Jekyll: split monolithic HTML into layouts, includes, and data files - Add _config.yml with centralized site metadata - Add Gemfile with Jekyll 4.x and jekyll-seo-tag - Add _layouts/default.html as base HTML layout - Add _includes/ for reusable partials (head, header, nav, footer, scripts) - Add _includes/sections/ with 13 content section files - Add _data/navigation.yml to drive sidebar navigation via Liquid - Refactor index.html to use Jekyll front matter and includes - Update .gitignore for Jekyll build artifacts - Update AGENTS.md with Jekyll-specific instructions Co-authored-by: Rafael Corrêa Gomes <rafaelstz@users.noreply.github.com> * Revert Jekyll refactoring: restore original pure HTML site Remove all Jekyll files (_config.yml, _layouts/, _includes/, _data/, Gemfile) and restore the original monolithic index.html and .gitignore. Restore AGENTS.md to the original non-Jekyll version. Co-authored-by: Rafael Corrêa Gomes <rafaelstz@users.noreply.github.com> * Add content to all empty sections and update existing ones for latest Git - Add git switch mention in git checkout section (Git 2.23+) - Add content for git remote and git submodule sections - Add content for Inspeção e Comparação: git show, log (advanced), diff (advanced), shortlog, describe - Add content for Pacotes: git apply, cherry-pick, diff (patches), rebase, revert - Add content for Debugando: git bisect, blame, grep - Add content for Email: git am, apply, format-patch, send-email, request-pull - Add content for Sistemas Externos: git svn, fast-import - Add content for Administração: git clean, gc, fsck, reflog, filter-branch, instaweb, archive - Add content for Servidor: git daemon, update-server-info - Add content for Canalização de Código: all 16 plumbing commands - Fix empty <li> bug in sidebar navigation - Mention git filter-repo as modern replacement for filter-branch Co-authored-by: Rafael Corrêa Gomes <rafaelstz@users.noreply.github.com> * Update copyright year from 2025 to 2026 Co-authored-by: Rafael Corrêa Gomes <rafaelstz@users.noreply.github.com> * Update CI and apply all SEO improvements CI changes: - Replace Jekyll build with HTML syntax validation (tidy) - Add broken internal link checker - Add sitemap.xml well-formedness validation - Add JSON-LD structured data syntax validation - Add robots.txt validation - Add TODO/FIXME marker check SEO improvements: - Change lang='pt' to lang='pt-BR' for correct locale targeting - Add hreflang tag for pt-BR - Add meta robots 'index, follow' tag - Remove deprecated meta keywords tag (ignored by Google since 2009) - Remove IE8 shims (HTML5 Shiv + Respond.js) - zero IE8 market share - Fix heading hierarchy: replace h3 tab labels with span.tab-title - Wrap 181 git command examples in <code> tags for semantic markup - Improve logo alt text for image search and accessibility - Add FAQ structured data (JSON-LD) for 6 common Git questions - Update sitemap.xml lastmod to 2026-02-24 - Add .tab-title and .well code CSS rules Co-authored-by: Rafael Corrêa Gomes <rafaelstz@users.noreply.github.com> * Fix CI: install libxml2-utils for xmllint command Co-authored-by: Rafael Corrêa Gomes <rafaelstz@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent 0d4a3de commit 33ba6ab

File tree

5 files changed

+1073
-170
lines changed

5 files changed

+1073
-170
lines changed
Lines changed: 60 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Jekyll site CI
1+
name: Validate HTML & Assets
22

33
on:
44
push:
@@ -7,14 +7,67 @@ on:
77
branches: [ "master" ]
88

99
jobs:
10-
build:
11-
10+
validate:
1211
runs-on: ubuntu-latest
1312

1413
steps:
1514
- uses: actions/checkout@v4
16-
- name: Build the site in the jekyll/builder container
15+
16+
- name: Install validation tools
17+
run: sudo apt-get update -qq && sudo apt-get install -y -qq tidy libxml2-utils
18+
19+
- name: Validate HTML syntax
20+
run: tidy -q -e index.html
21+
22+
- name: Check for broken internal links
23+
run: |
24+
# Extract href/src values and verify local files exist
25+
exit_code=0
26+
for file in $(grep -oP '(?:href|src)="(?!https?://|//|#|mailto:)([^"]+)"' index.html | grep -oP '"[^"]+"' | tr -d '"'); do
27+
if [ ! -f "$file" ] && [ ! -d "$file" ]; then
28+
echo "ERROR: Missing local file referenced in index.html: $file"
29+
exit_code=1
30+
fi
31+
done
32+
exit $exit_code
33+
34+
- name: Validate sitemap.xml well-formedness
35+
run: xmllint --noout sitemap.xml
36+
37+
- name: Validate JSON-LD structured data syntax
38+
run: |
39+
# Extract JSON-LD blocks and validate JSON syntax
40+
python3 -c "
41+
import json, re, sys
42+
with open('index.html') as f:
43+
html = f.read()
44+
blocks = re.findall(r'<script type=\"application/ld\+json\">(.*?)</script>', html, re.DOTALL)
45+
if not blocks:
46+
print('WARNING: No JSON-LD blocks found')
47+
sys.exit(0)
48+
for i, block in enumerate(blocks):
49+
try:
50+
data = json.loads(block)
51+
print(f'JSON-LD block {i+1}: valid ({data.get(\"@type\", \"unknown type\")})')
52+
except json.JSONDecodeError as e:
53+
print(f'ERROR: JSON-LD block {i+1} is invalid: {e}')
54+
sys.exit(1)
55+
"
56+
57+
- name: Validate robots.txt references
58+
run: |
59+
# Check that sitemap URL in robots.txt points to an existing file
60+
sitemap_path=$(grep -oP 'Sitemap:\s*https?://[^/]+/\K.*' robots.txt || true)
61+
if [ -n "$sitemap_path" ] && [ ! -f "$sitemap_path" ]; then
62+
echo "ERROR: robots.txt references missing sitemap: $sitemap_path"
63+
exit 1
64+
fi
65+
echo "robots.txt is valid"
66+
67+
- name: Check no TODO/FIXME markers in HTML
1768
run: |
18-
docker run \
19-
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
20-
jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
69+
if grep -inE '(TODO|FIXME|HACK|XXX)' index.html; then
70+
echo "WARNING: Found TODO/FIXME markers in index.html"
71+
else
72+
echo "No TODO/FIXME markers found"
73+
fi

AGENTS.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Cursor Cloud specific instructions
2+
3+
This is a static HTML/CSS website (no build tools, no package managers, no tests). It serves as a Git commands reference in Portuguese, hosted on GitHub Pages.
4+
5+
### Running locally
6+
7+
Serve files with any static HTTP server from the repo root:
8+
9+
```
10+
python3 -m http.server 8000
11+
```
12+
13+
Then open `http://localhost:8000/` in a browser.
14+
15+
### Linting
16+
17+
There are no project-defined lint or test scripts. HTML can be validated with `tidy -q -e index.html`.
18+
19+
### CI
20+
21+
The GitHub Actions workflow (`.github/workflows/jekyll-docker.yml`) runs a Jekyll build in a Docker container, but the site itself is served as raw static files on GitHub Pages.

0 commit comments

Comments
 (0)