index.html 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <!DOCTYPE html>
  2. <html lang="en-us">
  3. <head>
  4. <title>
  5. Build and Test Guide | codeskraps
  6. </title>
  7. <meta http-equiv="content-type" content="text/html; charset=utf-8">
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9. <meta name="description" content="Instructions for building and testing the blog before publishing">
  10. <meta name="generator" content="Hugo 0.145.0">
  11. <link rel="canonical" href="https://codeskraps.com/wiki/build-and-test/" >
  12. <link href="/css/style.min.ef8e99489b0b85e34523800e588426b1b4c05e27adcb9d7193952cef205afe6d.css" rel="stylesheet">
  13. <script defer src="https://umami.codeskraps.com/script.js" data-website-id="a80a52da-0b7d-4faf-9dfc-ee6ca5a8421f" data-do-not-track="true"></script>
  14. <link rel="stylesheet" href="/css/code-copy.css">
  15. <script defer src="/js/code-copy.js"></script>
  16. </head>
  17. <body>
  18. <div class="flexWrapper">
  19. <header class="headerWrapper">
  20. <div class="header">
  21. <div>
  22. <a class="terminal" href="https://codeskraps.com/">
  23. <span>me@codeskraps.com ~ $</span>
  24. </a>
  25. </div>
  26. <input class="side-menu" type="checkbox" id="side-menu">
  27. <label class="hamb" for="side-menu"><span class="hamb-line"></span></label>
  28. <nav class="headerLinks">
  29. <ul>
  30. <li>
  31. <a href="https://codeskraps.com/posts/" title="" >
  32. ~/posts</a>
  33. </li>
  34. <li>
  35. <a href="https://codeskraps.com/projects/" title="" >
  36. ~/projects</a>
  37. </li>
  38. <li>
  39. <a href="https://codeskraps.com/about/" title="" >
  40. ~/about</a>
  41. </li>
  42. </ul>
  43. </nav>
  44. </div>
  45. </header>
  46. <div class="content">
  47. <main class="main">
  48. <div class="postWrapper">
  49. <h1>Build and Test Guide</h1>
  50. <p>Instructions for building and testing the blog before publishing</p>
  51. <section class="postMetadata">
  52. <dl>
  53. <dt>published</dt>
  54. <dd><time datetime="2024-04-10">April 10, 2024</time></dd>
  55. <dt>reading time</dt>
  56. <dd>2 minutes</dd>
  57. </dl>
  58. </section>
  59. <div>
  60. <h1 id="build-and-test-guide">Build and Test Guide</h1>
  61. <p>This guide provides step-by-step instructions for building and testing the blog before publishing changes.</p>
  62. <h2 id="prerequisites">Prerequisites</h2>
  63. <ul>
  64. <li><a href="https://gohugo.io/installation/">Hugo</a> installed on your system</li>
  65. <li>Git for version control</li>
  66. <li>A modern web browser for testing</li>
  67. </ul>
  68. <h2 id="development-workflow">Development Workflow</h2>
  69. <h3 id="1-local-development">1. Local Development</h3>
  70. <p>To start the development server:</p>
  71. <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
  72. </span></span></code></pre></div><p>This will:</p>
  73. <ul>
  74. <li>Start a local server (usually at http://localhost:1313)</li>
  75. <li>Enable draft content viewing</li>
  76. <li>Watch for file changes and auto-reload</li>
  77. </ul>
  78. <h3 id="2-building-the-site">2. Building the Site</h3>
  79. <p>To build the site for production:</p>
  80. <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
  81. </span></span></code></pre></div><p>This will:</p>
  82. <ul>
  83. <li>Generate the static site in the <code>public/</code> directory</li>
  84. <li>Exclude draft content</li>
  85. <li>Optimize assets</li>
  86. </ul>
  87. <h3 id="3-testing-checklist">3. Testing Checklist</h3>
  88. <p>Before publishing, ensure you:</p>
  89. <ol>
  90. <li>
  91. <p>Run the development server and check:</p>
  92. <ul>
  93. <li>All pages load correctly</li>
  94. <li>Links work as expected</li>
  95. <li>Images display properly</li>
  96. <li>Responsive design works on different screen sizes</li>
  97. </ul>
  98. </li>
  99. <li>
  100. <p>Build the site and verify:</p>
  101. <ul>
  102. <li>No build errors in the console</li>
  103. <li>All assets are generated correctly</li>
  104. <li>The <code>public/</code> directory contains all necessary files</li>
  105. </ul>
  106. </li>
  107. <li>
  108. <p>Content review:</p>
  109. <ul>
  110. <li>Check for typos and grammar</li>
  111. <li>Verify formatting is consistent</li>
  112. <li>Ensure all images have alt text</li>
  113. <li>Test all interactive elements</li>
  114. </ul>
  115. </li>
  116. </ol>
  117. <h3 id="4-publishing">4. Publishing</h3>
  118. <p>After testing:</p>
  119. <ol>
  120. <li>
  121. <p>Commit your changes:</p>
  122. <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 .
  123. </span></span><span style="display:flex;"><span>git commit -m <span style="color:#f1fa8c">&#34;Your descriptive commit message&#34;</span>
  124. </span></span></code></pre></div></li>
  125. <li>
  126. <p>Push to your repository:</p>
  127. <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
  128. </span></span></code></pre></div></li>
  129. <li>
  130. <p>If using a CI/CD pipeline, verify the deployment was successful</p>
  131. </li>
  132. </ol>
  133. <h2 id="troubleshooting">Troubleshooting</h2>
  134. <p>Common issues and solutions:</p>
  135. <ul>
  136. <li><strong>Build errors</strong>: Check Hugo version compatibility and theme requirements</li>
  137. <li><strong>Missing content</strong>: Verify front matter is correct and content is in the right directory</li>
  138. <li><strong>Broken links</strong>: Use <code>hugo server</code> to test all internal links</li>
  139. <li><strong>Image issues</strong>: Check file paths and ensure images are in the correct directory</li>
  140. </ul>
  141. <h2 id="additional-resources">Additional Resources</h2>
  142. <ul>
  143. <li><a href="https://gohugo.io/documentation/">Hugo Documentation</a></li>
  144. <li><a href="https://github.com/LordMathis/hugo-theme-nightfall">Theme Documentation</a></li>
  145. <li><a href="https://www.markdownguide.org/">Markdown Guide</a></li>
  146. </ul>
  147. </div>
  148. </div>
  149. </main>
  150. </div>
  151. <footer class="footer">
  152. <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>
  153. </footer>
  154. </div>
  155. </body>
  156. </html>