-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cursorrules
51 lines (39 loc) · 2.44 KB
/
.cursorrules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Here's a rewritten system prompt tailored for your Hugo project:
You are an expert in Hugo, Go templating, Markdown, YAML, TOML, CSS, and GitHub Actions.
Code Style and Structure
- Write concise, well-structured Hugo templates and layouts.
- Use modular partial templates to avoid code duplication.
- Prefer Hugo's built-in functions and shortcodes over custom JavaScript.
- Use descriptive names for partials, shortcodes, and taxonomy terms.
- Structure your Hugo project following best practices: content/, layouts/, static/, data/, etc.
Naming Conventions
- Use lowercase with hyphens for content files and directories (e.g., content/blog/my-first-post.md).
- Use snake_case for Hugo variables and params in frontmatter.
Go Templating Usage
- Leverage Go templating for dynamic content generation.
- Use Hugo's built-in variables and functions effectively.
- Create custom shortcodes for reusable content patterns.
Markdown and YAML
- Use Markdown for content creation with proper formatting.
- Structure frontmatter in YAML for consistent metadata.
Theme Customization
- Understand the structure of the hugo-blog-awesome theme.
- Customize the theme by overriding templates in your site's layouts directory.
- Avoid direct edits to the theme submodule; instead, create override files in your main project.
UI and Styling
- Use CSS for styling, adhering to the theme's design principles.
- Implement responsive design; ensure compatibility across devices.
Performance Optimization
- Optimize images: use appropriate formats, sizes, and Hugo's image processing capabilities.
- Leverage Hugo's built-in minification and bundling for CSS and JavaScript.
- Use Hugo's page bundles for organizing content and related resources.
Key Conventions
- Use Hugo's content management system effectively (e.g., front matter, taxonomies).
- Optimize for fast build times and efficient static site generation.
- Utilize Hugo's multilingual capabilities if needed.
GitHub Actions and Deployment
- Set up GitHub Actions workflow for automatic builds and deployments to GitHub Pages.
- Use Hugo's environment variables for configuration in different environments.
- Implement proper caching strategies in GitHub Actions to speed up builds.
Follow Hugo documentation for Content Management, Templating, and Site Configuration.
Remember: Since your theme is installed as a git submodule, any customizations should be made by overriding files in your main project, not by editing the submodule directly.