This pull request introduces several documentation improvements and adds comprehensive Copilot and agent instruction files to the al-folio repository. The most significant changes are the addition of repository-wide and path-specific Copilot instructions, updates to agent documentation to reference these instructions, and improvements to the documentation structure and clarity regarding file purposes and workflows. **Copilot and Agent Instruction Enhancements:** - Added a new `.github/copilot-instructions.md` file providing detailed, repository-wide setup, build, CI/CD, troubleshooting, and file format guidance for Copilot coding agents. - Introduced `.github/instructions/bibtex-bibliography.instructions.md` with specific instructions for editing and validating BibTeX files, including custom keywords, formatting rules, and integration with Jekyll-Scholar. - Updated agent documentation files (`customize.agent.md`, `docs.agent.md`) to reference the new Copilot instruction files and explain their purpose and usage for both repository-wide and path-specific scenarios. [[1]](diffhunk://#diff-15864f2655921f50a97689076e3b8feba0da320463750845be6a76eb2e30bfe4L57-R65) [[2]](diffhunk://#diff-15864f2655921f50a97689076e3b8feba0da320463750845be6a76eb2e30bfe4L107-R122) [[3]](diffhunk://#diff-961a46180ce568ce43c20bf7129dc5e4926a9aa4e0d7bc19926ca5ee3ff95cd0L49-R51) [[4]](diffhunk://#diff-961a46180ce568ce43c20bf7129dc5e4926a9aa4e0d7bc19926ca5ee3ff95cd0L106-R137) **Documentation Structure and Clarity Improvements:** - Clarified and reorganized the documentation file list in agent files, removing references to deprecated or merged files (e.g., `MAINTENANCE.md`, `ACCESSIBILITY.md`) and updating descriptions to reflect current usage. [[1]](diffhunk://#diff-15864f2655921f50a97689076e3b8feba0da320463750845be6a76eb2e30bfe4L57-R65) [[2]](diffhunk://#diff-961a46180ce568ce43c20bf7129dc5e4926a9aa4e0d7bc19926ca5ee3ff95cd0L21-R21) [[3]](diffhunk://#diff-961a46180ce568ce43c20bf7129dc5e4926a9aa4e0d7bc19926ca5ee3ff95cd0L106-R137) - Enhanced documentation on the purpose and application of each documentation file, and added detailed explanations of Copilot instruction files and their role in project development. **Workflow and Validation Updates:** - Updated references and descriptions for GitHub Actions workflows in agent documentation to include the Copilot environment setup and clarify pre-commit and CI/CD requirements. [[1]](diffhunk://#diff-15864f2655921f50a97689076e3b8feba0da320463750845be6a76eb2e30bfe4L57-R65) [[2]](diffhunk://#diff-961a46180ce568ce43c20bf7129dc5e4926a9aa4e0d7bc19926ca5ee3ff95cd0L49-R51) - Corrected references for accessibility guidance, now directing users to `TROUBLESHOOTING.md` instead of the removed `ACCESSIBILITY.md`. These changes collectively improve the onboarding experience for both human contributors and AI agents, ensuring consistent adherence to project conventions and reducing errors. **References:** [[1]](diffhunk://#diff-227c2c26cb2ee0ce0f46a320fc48fbcbdf21801a57f59161b1d0861e8aad55f5R1-R253) [[2]](diffhunk://#diff-6fd2827fb8d9c2dd6dc973572201853487ecbbd1120b00425d4f1c21dfdcf35fR1-R174) [[3]](diffhunk://#diff-15864f2655921f50a97689076e3b8feba0da320463750845be6a76eb2e30bfe4L57-R65) [[4]](diffhunk://#diff-15864f2655921f50a97689076e3b8feba0da320463750845be6a76eb2e30bfe4L107-R122) [[5]](diffhunk://#diff-15864f2655921f50a97689076e3b8feba0da320463750845be6a76eb2e30bfe4L550-R562) [[6]](diffhunk://#diff-961a46180ce568ce43c20bf7129dc5e4926a9aa4e0d7bc19926ca5ee3ff95cd0L21-R21) [[7]](diffhunk://#diff-961a46180ce568ce43c20bf7129dc5e4926a9aa4e0d7bc19926ca5ee3ff95cd0L49-R51) [[8]](diffhunk://#diff-961a46180ce568ce43c20bf7129dc5e4926a9aa4e0d7bc19926ca5ee3ff95cd0L106-R137) --------- Signed-off-by: George Araújo <george.gcac@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
251 lines
7.3 KiB
Markdown
251 lines
7.3 KiB
Markdown
---
|
||
applyTo: "_config.yml,_data/**/*.yml"
|
||
---
|
||
|
||
# YAML Configuration Instructions
|
||
|
||
## YAML Configuration (\_config.yml)
|
||
|
||
### Critical Settings for Agents
|
||
|
||
When modifying `_config.yml`, always update these in pairs:
|
||
|
||
- **url** and **baseurl** must be consistent:
|
||
- Personal site: `url: https://username.github.io`, `baseurl:` (leave empty)
|
||
- Project site: `url: https://username.github.io`, `baseurl: /projectname/`
|
||
- **title, first_name, last_name** – Site header and metadata
|
||
- **description** – Used in RSS feeds and metadata
|
||
- **lang** – Language code (e.g., "en", "fr")
|
||
|
||
### Feature Flags in \_config.yml
|
||
|
||
Look for `enabled: false/true` patterns. Common ones:
|
||
|
||
- `blog.enabled`
|
||
- `news.enabled`
|
||
- `profile.image_circular`
|
||
- `profile.show_social_links`
|
||
- `projects.enabled`
|
||
- `publications.enabled`
|
||
- `related_blog_posts`
|
||
|
||
### YAML Syntax Rules
|
||
|
||
- Quote string values containing special characters: `":"`
|
||
- Use `>` for multi-line strings (ignore newlines)
|
||
- Use `|` for multi-line strings (preserve newlines)
|
||
- Indentation matters: always use spaces (2 spaces), never tabs
|
||
- No tabs allowed; use only spaces
|
||
|
||
### Testing YAML Syntax
|
||
|
||
If you modify `_config.yml`, verify syntax by running:
|
||
|
||
```bash
|
||
docker compose up
|
||
# Site should start without YAML parse errors
|
||
# Check output for "YAML parse error" or "valid YAML"
|
||
```
|
||
|
||
## Data Files (\_data/\*.yml)
|
||
|
||
Data files provide structured content that templates can access via Liquid. Each file serves a specific purpose.
|
||
|
||
### socials.yml
|
||
|
||
Defines social media links and contact information displayed on the site.
|
||
|
||
**Format:** Entries are displayed in the order they are defined (not alphabetically sorted)
|
||
|
||
**For standard socials:** Use the key with the appropriate value. Common built-in socials include:
|
||
|
||
- `email:` – Email address
|
||
- `cv_pdf:` – Path to CV PDF file
|
||
- `scholar_userid:` – Google Scholar ID
|
||
- `inspirehep_id:` – Inspire HEP author ID
|
||
- `rss_icon:` – Boolean to show/hide RSS icon
|
||
- And many others (see [jekyll-socials documentation](https://github.com/george-gca/jekyll-socials) for full list)
|
||
|
||
**For custom socials:** Define a custom entry with nested fields:
|
||
|
||
- `logo:` – URL or path to logo image
|
||
- `title:` – Display name
|
||
- `url:` – Profile or website URL
|
||
|
||
**Example:**
|
||
|
||
```yaml
|
||
cv_pdf: /assets/pdf/example_pdf.pdf
|
||
email: you@example.com
|
||
scholar_userid: qc6CJjYAAAAJ
|
||
github_username: username
|
||
linkedin_username: username
|
||
|
||
custom_social:
|
||
logo: https://example.com/logo.png
|
||
title: Custom Profile
|
||
url: https://example.com/
|
||
```
|
||
|
||
For more information, see the [jekyll-socials documentation](https://github.com/george-gca/jekyll-socials).
|
||
|
||
### cv.yml
|
||
|
||
CV content in **RenderCV format** (recommended approach for generating professional CVs).
|
||
|
||
**Format:** [RenderCV](https://rendercv.com/) YAML format — human-readable and designed specifically for professional resumes with automatic PDF generation capability.
|
||
|
||
**Key Files:**
|
||
|
||
- [`_data/cv.yml`](_data/cv.yml) — Main CV content in RenderCV format
|
||
- [`assets/rendercv/design.yaml`](assets/rendercv/design.yaml) — Design and styling customization
|
||
- [`assets/rendercv/locale.yaml`](assets/rendercv/locale.yaml) — Localization and text formatting
|
||
- [`assets/rendercv/settings.yaml`](assets/rendercv/settings.yaml) — RenderCV-specific settings
|
||
|
||
**Usage:** Rendered by `cv.liquid` layout on CV page; displayed in `about.liquid` on home page.
|
||
|
||
**Automatic PDF Generation:** When using RenderCV format, a GitHub Actions workflow (`render-cv.yml`) automatically generates a PDF version whenever you push changes to `_data/cv.yml`. The generated PDF is saved to `assets/rendercv/rendercv_output/` and can be linked via `cv_pdf` setting in `_config.yml`.
|
||
|
||
**Alternative Format (JSONResume):** For an alternative format, see `assets/json/resume.json` which uses the [JSONResume](https://jsonresume.org/) standard. Switch between formats using the `cv_format` frontmatter variable in `_pages/cv.md` (options: `rendercv` or `jsonresume`).
|
||
|
||
**For more details:** See [CUSTOMIZE.md § Modifying the CV information](CUSTOMIZE.md#modifying-the-cv-information) for setup, switching formats, and PDF generation configuration.
|
||
|
||
### citations.yml
|
||
|
||
Social media citation counts and metrics.
|
||
|
||
**Format:** Varies by platform (Google Scholar, ORCID, etc.)
|
||
|
||
**Example:**
|
||
|
||
```yaml
|
||
scholar_userid: YOUR_SCHOLAR_ID
|
||
```
|
||
|
||
### repositories.yml
|
||
|
||
GitHub repository listing for the repositories page.
|
||
|
||
**Format:** List of repository information
|
||
|
||
**Usage:** Used by repositories page to display GitHub projects
|
||
|
||
### coauthors.yml
|
||
|
||
Co-author information for bibliography/publications.
|
||
|
||
**Mapping:** Author names to profile URLs and affiliations
|
||
|
||
**Format:** Maps full names to contact info
|
||
|
||
**Example:**
|
||
|
||
```yaml
|
||
"Einstein, Albert":
|
||
url: https://en.wikipedia.org/wiki/Albert_Einstein
|
||
affiliation: Princeton University
|
||
```
|
||
|
||
## Common Modification Patterns
|
||
|
||
### Adding a New Feature Flag
|
||
|
||
1. Add to `_config.yml`:
|
||
|
||
```yaml
|
||
my_feature:
|
||
enabled: true
|
||
```
|
||
|
||
2. In Liquid templates use:
|
||
|
||
```liquid
|
||
{% if site.my_feature.enabled %}
|
||
... content ...
|
||
{% endif %}
|
||
```
|
||
|
||
3. Document the flag in CUSTOMIZE.md
|
||
|
||
### Updating Social Media Links
|
||
|
||
1. Edit `_data/socials.yml`
|
||
2. Keep entries alphabetically sorted
|
||
3. Ensure `icon` identifiers match available icons (Academicons or Font Awesome)
|
||
4. Use full profile URLs in `url` field
|
||
5. Test: `docker compose up` → check social icons on site
|
||
|
||
### Modifying Site Metadata
|
||
|
||
Update these in `_config.yml`:
|
||
|
||
- **title** – Site name
|
||
- **first_name, last_name** – Your name
|
||
- **email** – Contact email
|
||
- **description** – Site tagline (used in RSS, metadata)
|
||
- **keywords** – Search keywords
|
||
|
||
### Adding Co-authors
|
||
|
||
1. Edit `_data/coauthors.yml`
|
||
2. Add entry with author name as key
|
||
3. Include `url:` and `affiliation:` fields
|
||
4. This maps author names in BibTeX to profile links
|
||
|
||
## Validation Before Committing
|
||
|
||
**Always run these checks:**
|
||
|
||
1. **YAML syntax check:**
|
||
|
||
```bash
|
||
# Run Jekyll build to validate YAML
|
||
docker compose down
|
||
docker compose up
|
||
# Wait for "Server running" message
|
||
# Check output for "YAML parse error" messages
|
||
```
|
||
|
||
2. **Prettier format check:**
|
||
|
||
```bash
|
||
npx prettier _config.yml _data/ --check
|
||
npx prettier . --write # Fix formatting
|
||
```
|
||
|
||
3. **Visual verification:**
|
||
- Open http://localhost:8080
|
||
- Check that your changes appear correctly
|
||
- Verify navigation, social links, and metadata work
|
||
- Check site title and description in page source
|
||
|
||
## Common Issues
|
||
|
||
### "YAML parse error"
|
||
|
||
- Check for unquoted special characters (`:`, `&`, `#`, `|`, `>`)
|
||
- Verify indentation uses only spaces (2 spaces per level)
|
||
- Ensure closing quotes and braces are present
|
||
|
||
### Feature flag not working
|
||
|
||
- Check syntax: `feature: enabled: true` (colon after feature name)
|
||
- Verify spelling in Liquid template: `{% if site.feature.enabled %}`
|
||
- Clear browser cache if using old cached pages
|
||
|
||
### Social links not appearing
|
||
|
||
- Verify `_data/socials.yml` has correct entries
|
||
- Check icon identifiers exist in Font Awesome or Academicons
|
||
- Ensure `url:` field is not empty
|
||
|
||
## Trust These Instructions
|
||
|
||
When working with YAML configuration:
|
||
|
||
- Always test locally with `docker compose up` after changes
|
||
- Quote any string containing special characters
|
||
- Keep indentation consistent (2 spaces)
|
||
- Check output for YAML parse errors before committing
|
||
- Only search for additional details if encountering error messages not mentioned here
|