123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- <!DOCTYPE html>
- <html lang="en-us">
- <head>
- <title>
- Build and Test Guide | codeskraps
- </title>
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="description" content="Instructions for building and testing the blog before publishing">
- <meta name="generator" content="Hugo 0.145.0">
- <link rel="canonical" href="https://codeskraps.com/wiki/build-and-test/" >
- <link href="/css/style.min.ef8e99489b0b85e34523800e588426b1b4c05e27adcb9d7193952cef205afe6d.css" rel="stylesheet">
- <script defer src="https://umami.codeskraps.com/script.js" data-website-id="a80a52da-0b7d-4faf-9dfc-ee6ca5a8421f" data-do-not-track="true"></script>
- <link rel="stylesheet" href="/css/code-copy.css">
- <script defer src="/js/code-copy.js"></script>
- </head>
- <body>
- <div class="flexWrapper">
- <header class="headerWrapper">
- <div class="header">
- <div>
- <a class="terminal" href="https://codeskraps.com/">
- <span>me@codeskraps.com ~ $</span>
- </a>
- </div>
- <input class="side-menu" type="checkbox" id="side-menu">
- <label class="hamb" for="side-menu"><span class="hamb-line"></span></label>
- <nav class="headerLinks">
- <ul>
-
- <li>
- <a href="https://codeskraps.com/posts/" title="" >
- ~/posts</a>
- </li>
-
- <li>
- <a href="https://codeskraps.com/projects/" title="" >
- ~/projects</a>
- </li>
-
- <li>
- <a href="https://codeskraps.com/about/" title="" >
- ~/about</a>
- </li>
-
- </ul>
- </nav>
- </div>
- </header>
- <div class="content">
- <main class="main">
-
- <div class="postWrapper">
- <h1>Build and Test Guide</h1>
-
- <p>Instructions for building and testing the blog before publishing</p>
-
-
- <section class="postMetadata">
- <dl>
-
-
-
-
- <dt>published</dt>
-
- <dd><time datetime="2024-04-10">April 10, 2024</time></dd>
-
-
- <dt>reading time</dt>
- <dd>2 minutes</dd>
-
- </dl>
- </section>
-
- <div>
- <h1 id="build-and-test-guide">Build and Test Guide</h1>
- <p>This guide provides step-by-step instructions for building and testing the blog before publishing changes.</p>
- <h2 id="prerequisites">Prerequisites</h2>
- <ul>
- <li><a href="https://gohugo.io/installation/">Hugo</a> installed on your system</li>
- <li>Git for version control</li>
- <li>A modern web browser for testing</li>
- </ul>
- <h2 id="development-workflow">Development Workflow</h2>
- <h3 id="1-local-development">1. Local Development</h3>
- <p>To start the development server:</p>
- <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>hugo server -D
- </span></span></code></pre></div><p>This will:</p>
- <ul>
- <li>Start a local server (usually at http://localhost:1313)</li>
- <li>Enable draft content viewing</li>
- <li>Watch for file changes and auto-reload</li>
- </ul>
- <h3 id="2-building-the-site">2. Building the Site</h3>
- <p>To build the site for production:</p>
- <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>hugo
- </span></span></code></pre></div><p>This will:</p>
- <ul>
- <li>Generate the static site in the <code>public/</code> directory</li>
- <li>Exclude draft content</li>
- <li>Optimize assets</li>
- </ul>
- <h3 id="3-testing-checklist">3. Testing Checklist</h3>
- <p>Before publishing, ensure you:</p>
- <ol>
- <li>
- <p>Run the development server and check:</p>
- <ul>
- <li>All pages load correctly</li>
- <li>Links work as expected</li>
- <li>Images display properly</li>
- <li>Responsive design works on different screen sizes</li>
- </ul>
- </li>
- <li>
- <p>Build the site and verify:</p>
- <ul>
- <li>No build errors in the console</li>
- <li>All assets are generated correctly</li>
- <li>The <code>public/</code> directory contains all necessary files</li>
- </ul>
- </li>
- <li>
- <p>Content review:</p>
- <ul>
- <li>Check for typos and grammar</li>
- <li>Verify formatting is consistent</li>
- <li>Ensure all images have alt text</li>
- <li>Test all interactive elements</li>
- </ul>
- </li>
- </ol>
- <h3 id="4-publishing">4. Publishing</h3>
- <p>After testing:</p>
- <ol>
- <li>
- <p>Commit your changes:</p>
- <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>git add .
- </span></span><span style="display:flex;"><span>git commit -m <span style="color:#f1fa8c">"Your descriptive commit message"</span>
- </span></span></code></pre></div></li>
- <li>
- <p>Push to your repository:</p>
- <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>git push
- </span></span></code></pre></div></li>
- <li>
- <p>If using a CI/CD pipeline, verify the deployment was successful</p>
- </li>
- </ol>
- <h2 id="troubleshooting">Troubleshooting</h2>
- <p>Common issues and solutions:</p>
- <ul>
- <li><strong>Build errors</strong>: Check Hugo version compatibility and theme requirements</li>
- <li><strong>Missing content</strong>: Verify front matter is correct and content is in the right directory</li>
- <li><strong>Broken links</strong>: Use <code>hugo server</code> to test all internal links</li>
- <li><strong>Image issues</strong>: Check file paths and ensure images are in the correct directory</li>
- </ul>
- <h2 id="additional-resources">Additional Resources</h2>
- <ul>
- <li><a href="https://gohugo.io/documentation/">Hugo Documentation</a></li>
- <li><a href="https://github.com/LordMathis/hugo-theme-nightfall">Theme Documentation</a></li>
- <li><a href="https://www.markdownguide.org/">Markdown Guide</a></li>
- </ul>
- </div>
- </div>
- </main>
- </div>
- <footer class="footer">
-
- <span>CC 2025, Built with <a href="https://gohugo.io" class="footerLink">Hugo</a> | Analytics by <a href="https://umami.codeskraps.com/" class="footerLink">Self-hosted Umami</a></span>
-
- </footer>
- </div>
- </body>
- </html>
|