CORS (Cross-Origin Resource Sharing) Explained

What is CORS? CORS (Cross-Origin Resource Sharing) is a browser security mechanism that controls which websites can make API calls to other domains. What is an Origin? Origin = Protocol + Domain + Port https://example.com:443 ↑ ↑ ↑ Protocol Domain Port Same-Origin Examples: Origin 1: https://example.com/page1 Origin 2: https://example.com/page2 → Same origin ✓ Cross-Origin Examples: Origin 1: https://example.com Origin 2: https://api.example.com → Different domain = Cross-origin ✗ Origin 1: https://example.com Origin 2: http://example.com → Different protocol = Cross-origin ✗ Origin 1: https://example.com:443 Origin 2: https://example.com:8080 → Different port = Cross-origin ✗ Why CORS Exists Without CORS: ...

November 28, 2025 · 7 min · Ren Nishino

Hugo Static Site Generator Basics

What is Hugo? Hugo: Fast static site generator written in Go Converts markdown → HTML No database needed Extremely fast builds (milliseconds) Single binary (easy installation) Key Concepts Static Site Generator Builds HTML files at build time (not runtime) No server-side processing Just serve files (S3, CloudFront, etc.) Content Written in markdown (.md files) Stored in content/ directory Organized by sections (folders) Theme Controls site appearance Layouts, CSS, JavaScript Can customize or use existing Front Matter Metadata at top of markdown file Between --- markers YAML, TOML, or JSON format Project Structure my-site/ ├── hugo.yaml # Site configuration ├── content/ # Your markdown files │ └── posts/ │ └── my-post.md ├── themes/ # Theme files │ └── PaperMod/ ├── static/ # Static files (images, etc.) ├── layouts/ # Custom layouts (optional) └── public/ # Generated site (after build) Create New Post # Create new post hugo new posts/my-study-note.md # Opens: content/posts/my-study-note.md Generated file: ...

November 27, 2025 · 3 min · Ren Nishino