Build and smoke test the Hugo site by starting a local server and checking key pages load properly using Playwright MCP...
This skill builds the Hugo site, starts a local server, and uses the Playwright MCP to verify that key pages load correctly with browser automation.
When the user asks to run a smoke test, follow these steps:
Build the site with:
hugo --cleanDestinationDir
If the build fails, check for:
config.toml or hugo.tomlStart the development server in the background:
hugo server --port 1313 --disableFastRender
Wait 2-3 seconds for the server to fully start before proceeding.
Use the Playwright MCP tools to check these pages:
Pages to Check:
http://localhost:1313/http://localhost:1313/about/content/posts/For each page:
Navigate using browser_navigate (user-playwright MCP):
Capture page snapshot using browser_snapshot:
Check for errors using browser_console_messages:
Provide a summary:
Stop the Hugo server gracefully.
Home Page (/)
About Page (/about/)
Post Pages (/posts/[slug]/)
To select 3 random posts:
content/posts/index.md/posts/[directory-name]/Build failures
hugo output for specific errorsthemes/Server won't start
hugo versionPages don't load
curl http://localhost:1313/content/ directoryBrowser automation fails
For a faster manual verification without automation:
hugo && hugo server
Then manually visit:
To test different pages or add custom checks:
Add more static pages:
Test more/fewer posts:
Add specific content checks:
browser_snapshot to verify presence