Instruction file imported from nclsbayona/nclsbayona.github.io (
.github/instructions/POLISHING.instructions.md). Copyright stays with the author.
Polishing Instructions for nclsbayona.github.io
Purpose
This document provides guidelines for polishing and refining content, code, and configurations in the nclsbayona.github.io repository before publishing or merging changes.
Content Polishing Checklist
Blog Post Quality Review
Before publishing a new blog post, ensure:
Writing Quality
- Grammar and spelling: Run through spell checker
- Technical accuracy: Verify all technical details are correct
- Code examples: Test all code snippets to ensure they work
- Links: Verify all external links are valid and relevant
- Tone: Maintain professional yet approachable voice
- Reading level: Appropriate for target audience
Structure and Formatting
- Clear headings: Logical hierarchy (H2, H3, H4)
- Introduction: Hook that explains what reader will learn
- Body: Well-organized sections with clear transitions
- Conclusion: Summary and actionable takeaways
- Code blocks: Proper syntax highlighting and language tags
- Lists: Use bullet points and numbered lists appropriately
- Emphasis: Bold and italic used sparingly and purposefully
Visual Elements
- Images: Optimized for web (compressed, appropriate size)
- Alt text: Descriptive alt text for all images
- Diagrams: Clear and readable at various screen sizes
- Screenshots: Annotated where helpful
- Code snippets: Syntax-highlighted and properly formatted
Metadata and SEO
- Title: Descriptive and includes primary keyword (50-60 chars)
- Description: Compelling summary (150-160 chars)
- Slug: URL-friendly, descriptive, includes keyword
- Categories: Appropriate category assigned
- Tags: 3-7 relevant tags added
- Date: Correct publication date
- Featured image: High-quality cover image if applicable
Technical Requirements
- Frontmatter: All required fields completed
- Internal links: Link to related posts where relevant
- External references: Credit sources and include documentation links
- Draft status: Set to
falsewhen ready to publish
Example Frontmatter Template
---
title: "Complete Guide to Kubernetes Security Best Practices"
description: "Learn essential security practices for hardening your Kubernetes clusters with practical examples and real-world scenarios."
date: 2024-02-11
slug: kubernetes-security-best-practices
categories:
- Kubernetes
- Cybersecurity
tags:
- kubernetes
- security
- devops
- best-practices
- containers
image: cover-security.jpg
draft: false
---
Code Polishing Standards
Hugo Templates and Layouts
- Comments: Add comments explaining complex logic
- Variable names: Use descriptive, semantic names
- Indentation: Consistent 2-space indentation
- Spacing: Blank lines between logical sections
- Partials: Reuse partials instead of duplicating code
- Context: Use
.context appropriately
Custom Scripts (Go, Shell, etc.)
- Documentation: Function/script purpose explained in comments
- Error handling: Proper error checking and messages
- Input validation: Validate all inputs
- Exit codes: Return appropriate exit codes
- Logging: Include helpful log messages
- Dependencies: Document required packages/tools
SCSS/CSS
- Organization: Logical grouping of styles
- Variables: Use variables for colors, sizes, etc.
- Specificity: Avoid overly specific selectors
- Responsiveness: Test on multiple screen sizes
- Browser compatibility: Test in major browsers
- Performance: Minimize unnecessary styles
Configuration Polishing
Hugo Config Files
- Comments: Explain non-obvious settings
- Consistency: Consistent formatting across files
- Validation: Test configuration changes locally
- Security: No secrets or credentials in config
- Documentation: Update config/README.md if needed
GitHub Actions Workflows
- Comments: Explain complex workflow logic
- Permissions: Minimal required permissions
- Secrets: Use GitHub Secrets for sensitive data
- Error handling: Graceful failure handling
- Concurrency: Appropriate concurrency controls
- Documentation: Update .github/workflows/README.md if needed
Pre-Commit Checklist
Before committing changes:
General
- Build locally:
hugo --minifysucceeds - Test locally:
hugo server -Dworks correctly - Review changes:
git diffshows expected changes - No temp files: No
.DS_Store,Thumbs.db, etc. - No secrets: No API keys, passwords, or tokens
Commit Quality
- Conventional commits: Follow format (feat, fix, docs, etc.)
- Descriptive message: Clear what and why
- Atomic commits: One logical change per commit
- Scope: Include scope in commit message if applicable
Documentation
- README updated: If adding features
- CHANGELOG: Semantic release will handle
- Comments: Added where needed
Pre-Release Checklist
Before creating a release or deploying major changes:
Testing
- Full build: Clean build succeeds
- Link validation: No broken links
- Cross-browser: Test in Chrome, Firefox, Safari
- Mobile: Test responsive design
- Performance: Lighthouse score reviewed
Security
- Dependencies: No known vulnerabilities
- Gitleaks scan: No secrets exposed
- Trivy scan: No critical vulnerabilities
- ZAP scan: No major security issues
Content
- Spelling: Run spell checker across all content
- Images: All images optimized
- Links: All links valid and working
- SEO: Meta tags and descriptions complete
Deployment
- Staging test: Test on staging if available
- Backup: Ensure backups exist
- Rollback plan: Know how to revert if needed
- Monitoring: Check GitHub Actions after deploy
Polishing Tools and Resources
Recommended Tools
Writing and Grammar:
- Grammarly or LanguageTool for grammar checking
- Hemingway Editor for readability
- Markdown linters (markdownlint)
Code Quality:
- gofmt for Go code formatting
- Prettier for JS/CSS/JSON formatting
- ShellCheck for shell script validation
Image Optimization:
- ImageOptim, TinyPNG, or Squoosh
- Hugo's built-in image processing
Link Checking:
- Broken Link Checker
- Hugo's built-in link checker
SEO:
- Google Search Console
- Lighthouse (built into Chrome DevTools)
- SEO checkers
Testing Commands
# Build and check for errors
hugo --minify --verbose
# Start dev server
hugo server -D
# Check Hugo config
hugo config
# Verify modules
hugo mod verify
# Check module graph
hugo mod graph
Quality Standards
Content Metrics
Aim for:
- Readability: Grade level 8-12
- Word count: 800-2000 words for technical posts
- Code examples: At least 2-3 practical examples
- Visuals: 1-3 images/diagrams per post
- Links: 3-5 relevant references
Performance Metrics
Target:
- Lighthouse Performance: > 90
- First Contentful Paint: < 1.5s
- Time to Interactive: < 3.5s
- Image sizes: < 200KB per image
- Total page size: < 1MB
Accessibility Standards
Ensure:
- Alt text: All images have descriptive alt text
- Heading hierarchy: Logical H1 → H2 → H3 structure
- Color contrast: WCAG AA minimum (4.5:1)
- Keyboard navigation: All interactive elements accessible
- Screen reader: Content makes sense with screen reader
Continuous Improvement
Regular Reviews
Monthly:
- Review analytics for popular/underperforming posts
- Update outdated content
- Check for broken links
- Review security advisories
Quarterly:
- Audit site performance
- Review and update dependencies
- Refresh oldest content
- Assess SEO rankings
Yearly:
- Major content audit
- Theme/design refresh consideration
- Architecture review
- Technology stack evaluation
Questions and Feedback
For questions about polishing standards or suggestions for improvement:
- Open an issue with the "documentation" label
- Propose changes via pull request
- Discuss in team meetings (if applicable)
Related Documentation
- CONTRIBUTING.md - Contribution guidelines
- DEVELOPMENT.md - Development setup
- .github/workflows/README.md - Workflow documentation
- config/README.md - Configuration guide