Load assets using a relative path
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3541397. -->
Reported by: [codebymikey](https://www.drupal.org/user/3573206)
Related to !394
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Currently the image assets used in the markdown files fail to render when viewed from <a href="https://git.drupalcode.org/project/gitlab_templates/-/blob/4dc6e19e/docs/jobs/test-only-changes.md">the Gitlab repository</a>.</p>
<p>This is because they currently use a <code>/gitlab_templates/</code> prefix in order to render properly on <a href="https://project.pages.drupalcode.org/gitlab_templates/jobs/test-only-changes/">GitLab pages</a>.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>We should use an appropriate variable so that Gitlab pages renders the relative asset paths properly.</p>
<p>Following the documentation on <a href="https://www.mkdocs.org/user-guide/configuration/#site_url">https://www.mkdocs.org/user-guide/configuration/#site_url</a>, we should add the following to the <code>mkdocs.yml</code> file.</p>
<div class="codeblock">
<pre><span style="color: #000000"><span style="color: #0000BB"><?php<br>site_url</span><span style="color: #007700">: </span><span style="color: #DD0000">'https://project.pages.drupalcode.org/gitlab_templates/'<br></span><span style="color: #0000BB">?></span></span></pre></div>
<p>And that'll render the assets properly.</p>
> Related issue: [Issue #3426311](https://www.drupal.org/node/3426311)
issue