Skip to content

feat: add netlify.toml for PR deploy previews#534

Open
Vaishnav88sk wants to merge 1 commit into
microcks:masterfrom
Vaishnav88sk:feat/netlify-deploy-previews
Open

feat: add netlify.toml for PR deploy previews#534
Vaishnav88sk wants to merge 1 commit into
microcks:masterfrom
Vaishnav88sk:feat/netlify-deploy-previews

Conversation

@Vaishnav88sk
Copy link
Copy Markdown
Contributor

Description

Improve the contribution experience by making PR reviews faster and more efficient. This addresses issue #334 where the community requested Netlify preview setup.

This PR adds a netlify.toml configuration file to enable Netlify's deploy preview functionality:

  • Build settings with Hugo version specification
  • Redirect rules for backward compatibility (/docs/, /blog/)
  • Security headers (X-Frame-Options, X-Content-Type-Options)
  • Cache headers for assets (JS, CSS, images)
  • Environment-specific settings for production, preview, and staging

Related issue(s)

#334

@github-actions
Copy link
Copy Markdown

👋 @Vaishnav88sk

Welcome to the Microcks community! 💖

Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly.

Hope you have a great time there!

@Vaishnav88sk Vaishnav88sk force-pushed the feat/netlify-deploy-previews branch from d4987bd to 1055444 Compare April 14, 2026 11:09
@Caesarsage
Copy link
Copy Markdown
Contributor

this is duplicate. There is already a robost PR here

#475

@Vaishnav88sk
Copy link
Copy Markdown
Contributor Author

this is duplicate. There is already a robost PR here

#475

If it is, I am happy to close it.

@yada
Copy link
Copy Markdown
Member

yada commented May 26, 2026

#475 merged
Let's test it live and see if this netlify.toml is relevant, @Vaishnav88sk can you test it on a fork?

@Vaishnav88sk Vaishnav88sk force-pushed the feat/netlify-deploy-previews branch from 1055444 to 0390c2e Compare May 26, 2026 09:32
@Vaishnav88sk
Copy link
Copy Markdown
Contributor Author

Let's test it live and see if this netlify.toml is relevant, @Vaishnav88sk can you test it on a fork?

@yada I tested this (merged #475 + my PR combined) live by triggering a Deploy Preview on my own fork.

The netlify.toml file works perfectly! The preview successfully applies all the configurations:

Security and Cache headers are correctly injected.
Redirects for /docs/ and /blog/ are active.
Hugo and Node versions are pinned.
Everything looks good on my end. Let me know if we are ready to merge!

Netlify preview pass:
image

screenshot of the terminal output proving the headers and redirects are working on the preview URL:
image

… and version pinning

Adds on top of PR microcks#475:
- Hugo 0.123.0 and Node 20 version pinning
- Redirect rules for /docs/* and /blog/* URLs
- Security headers (X-Frame-Options, X-Content-Type-Options, Referrer-Policy)
- Cache-Control headers for JS, CSS, and image assets
- Environment-specific HUGO_ENV for preview and staging contexts

Signed-off-by: Vaishnav88sk <vaishnavsk8804@gmail.com>
@Vaishnav88sk Vaishnav88sk force-pushed the feat/netlify-deploy-previews branch from 0390c2e to 3ca8be7 Compare May 26, 2026 10:43
@Vaishnav88sk
Copy link
Copy Markdown
Contributor Author

@yada I think good to merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants