<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Vscode on homelab</title>
    <link>https://homelab.nbkelley.com/tags/vscode/</link>
    <description>Recent content in Vscode on homelab</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Mon, 31 Mar 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://homelab.nbkelley.com/tags/vscode/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>VS Code Live Server Path Configuration</title>
      <link>https://homelab.nbkelley.com/docs/development/vscode-liveserver-paths/</link>
      <pubDate>Mon, 31 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://homelab.nbkelley.com/docs/development/vscode-liveserver-paths/</guid>
      <description>&lt;h1 id=&#34;vs-code-live-server-path-configuration&#34;&gt;VS Code Live Server Path Configuration&lt;a class=&#34;anchor&#34; href=&#34;#vs-code-live-server-path-configuration&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;what-was-established&#34;&gt;What Was Established&lt;a class=&#34;anchor&#34; href=&#34;#what-was-established&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Resolved the &amp;ldquo;Cannot GET /page-name&amp;rdquo; error in VS Code Live Server by implementing a standardized project directory structure and correct relative pathing. The core fix involves ensuring the server root is set to the project root and using &lt;code&gt;../&lt;/code&gt; to traverse up from subdirectories.&lt;/p&gt;&#xA;&lt;h2 id=&#34;key-decisions&#34;&gt;Key Decisions&lt;a class=&#34;anchor&#34; href=&#34;#key-decisions&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Project Rooting&lt;/strong&gt;: Always open the top-level project folder in VS &lt;code&gt;Code&lt;/code&gt; rather than individual subfolders (like &lt;code&gt;html/&lt;/code&gt;). This allows Live Server to correctly resolve paths relative to the project root.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Directory Separation&lt;/strong&gt;: Adopted a structured hierarchy to separate assets, logic, and presentation.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;current-configuration&#34;&gt;Current Configuration&lt;a class=&#34;anchor&#34; href=&#34;#current-configuration&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;project-structure&#34;&gt;Project Structure&lt;a class=&#34;anchor&#34; href=&#34;#project-structure&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;project-root/&#xA;├── Assets/&#xA;│   ├── icons/&#xA;│   └── images/&#xA;├── html/&#xA;│   ├── index.html&#xA;│   ├── about.html&#xA;│   └── contact.html&#xA;├── scripts/&#xA;│   └── main.js&#xA;└── Styles/&#xA;    └── style.css&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;pathing-rules-when-working-inside-html&#34;&gt;Pathing Rules (when working inside &lt;code&gt;html/&lt;/code&gt;)&lt;a class=&#34;anchor&#34; href=&#34;#pathing-rules-when-working-inside-html&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;When files are located within the &lt;code&gt;html/&lt;/code&gt; subdirectory, all links to external directories must use the &lt;code&gt;../&lt;/code&gt; prefix to exit the &lt;code&gt;html/&lt;/code&gt; folder first.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
