pages/.github/instructions/markdown-content.instructions.md
George 25b758805c
Added copilot instructions, AGENTS.md, improved README files (#3486)
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>
2026-01-28 22:55:05 -03:00

278 lines
5.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
applyTo: "_books/**/*.md,_news/**/*.md,_pages/**/*.md,_posts/**/*.md,_projects/**/*.md,_teachings/**/*.md"
---
# Content Files (Markdown) Instructions
## File Organization
Content in al-folio is organized by type:
- **\_books/** Book reviews and summaries
- **\_news/** News/announcements
- **\_pages/** Static pages (about, CV, publications, projects, etc.)
- **\_posts/** Blog posts (format: `YYYY-MM-DD-title.md`)
- **\_projects/** Project showcase entries
- **\_teachings/** Course and teaching information
## Frontmatter Structure
Every markdown file requires YAML frontmatter at the top. The structure varies by content type.
### Book Frontmatter (\_books/)
```yaml
---
layout: book-review
title: Book Title
author: Book Author Name
publisher: Publisher Name
year: 2023
rating: 8/10
img: /assets/img/book-cover.jpg
---
```
### News Frontmatter (\_news/)
```yaml
---
layout: post
title: News Title
date: YYYY-MM-DD
---
```
### Page Frontmatter (\_pages/)
```yaml
---
layout: page
title: Page Title
permalink: /pathname/
description: Brief description for metadata
---
```
### Blog Post Frontmatter (\_posts/)
```yaml
---
layout: post
title: Post Title
date: YYYY-MM-DD
categories: category-name
description: Brief description
---
```
**Important:** Post filenames MUST follow format: `YYYY-MM-DD-title.md` (hyphen-separated words)
### Project Frontmatter (\_projects/)
```yaml
---
layout: page
title: Project Name
description: Short description
img: /assets/img/project-image.jpg
importance: 1
---
```
### Teaching/Course Frontmatter (\_teachings/)
```yaml
---
layout: page
title: Course Title
description: Course description
---
```
## Special Frontmatter Fields
### For Books
- **author:** Author name or comma-separated list
- **publisher:** Publisher name
- **year:** Publication year
- **rating:** Personal rating (e.g., `8/10`)
- **img:** Path to book cover image (`/assets/img/...`)
### For Blog Posts
- **categories:** Tag for post organization (single word, no spaces)
- **related_posts:** Set to `false` to disable related posts display (useful for short posts)
### For Projects
- **importance:** Integer (1, 2, 3...) higher = featured first
- **img:** Path to thumbnail image (`/assets/img/...`)
- **featured:** Set to `true` to display on main projects section
### Date Format
Always use ISO 8601: `YYYY-MM-DD` (e.g., `2023-12-25`)
## Markdown Content
### Basic Markdown Syntax
```markdown
# Heading 1
## Heading 2
### Heading 3
**bold text**
_italic text_
`inline code`
- List item 1
- List item 2
[Link text](https://url.com)
![Image alt text](/path/to/image.jpg)
```
### al-folio-Specific Features
#### Includes/Shortcodes
- `{% include figure.liquid ... %}` Responsive images with captions
- `{% include audio.liquid ... %}` Audio player
- `{% include video.liquid ... %}` Video player
- `{% include bib_search.liquid ... %}` Bibliography search
- `{% include calendar.liquid ... %}` Event calendar
#### Math Support
```markdown
Inline: $E = mc^2$
Display mode:
$$\int_0^1 f(x) dx$$
```
#### Code Blocks
````markdown
```python
def hello():
print("Hello, world!")
```
````
#### Blockquotes
```markdown
> This is a quote
>
> > Nested quote
```
### Jekyll Features Available
- **Liquid variables:** `{{ site.title }}`, `{{ page.title }}`
- **Collections:** `{{ site.posts }}`, `{{ site.projects }}`
- **Filters:** `| date: format`, `| where: key value`
- **Tags:** `{% if condition %} ... {% endif %}`
## Common Content Patterns
### Creating a Blog Post
1. Create file: `_posts/YYYY-MM-DD-my-post.md`
2. Add frontmatter with `layout: post`, `title`, `date`, `categories`
3. Write markdown content
4. Test: `docker compose up` → http://localhost:8080/blog
5. Post will appear in reverse chronological order
### Creating a Project Entry
1. Create file: `_projects/project-name.md`
2. Add frontmatter with `layout: page`, `title`, `description`, `img`, `importance`
3. Write markdown content describing the project
4. Test: `docker compose up` → http://localhost:8080/projects
### Adding Images
```markdown
{% include figure.liquid path="/assets/img/example.jpg" title="Image caption" %}
```
### Linking to Other Pages
```markdown
[About Me](/about/)
[My CV](/cv/)
[Blog Post]({% link _posts/2023-01-15-my-post.md %})
```
## Testing & Validation
### Before Committing
1. **Frontmatter syntax:** Verify YAML is valid (no unclosed quotes, proper indentation)
2. **Date format:** Check `YYYY-MM-DD` format is correct
3. **Build test:**
```bash
docker compose down
docker compose up
# Wait for "Server running" message
# Navigate to your content in browser
# Verify formatting, images, and links work
```
### Common Issues
- **Post not appearing:** Check `date` is today or earlier, filename format is correct
- **Images not loading:** Verify path starts with `/assets/`, file exists
- **Related posts error:** Content has no meaningful words; add more text or set `related_posts: false`
## File Naming Conventions
### Blog Posts
- Format: `YYYY-MM-DD-title-with-hyphens.md`
- Example: `2023-12-25-christmas-post.md`
- Words separated by hyphens, no spaces
### Projects
- Format: `project-name.md`
- Example: `my-research-project.md`
- Use hyphens for readability
### Pages
- Format: `descriptive-name.md`
- Example: `about.md`, `teaching.md`, `cv.md`
## Markdown Linting & Formatting
The Prettier formatter applies to markdown files:
- **Line length:** Soft wrap at 88 characters
- **Lists:** Consistent bullet formatting
- **Code blocks:** Proper fence syntax
- **Spacing:** Consistent blank lines
**Always run before committing:**
```bash
npx prettier --write .
```
## Trust These Instructions
When creating or editing content:
- Follow the frontmatter structure for your content type
- Test locally with `docker compose up` to verify appearance
- Check date format, filename format, and image paths
- Only search for advanced features if frontmatter or markdown error messages appear