mirror of
https://github.com/alirezarezvani/claude-skills.git
synced 2026-08-28 04:24:58 +00:00
docs: harden llms.txt footer URL join against site_url without trailing slash
Follow-up to the llms.txt footer links (PR #879). The automated review noted the URL join assumed site_url ends in "/". Compute the base once with trim('/') so the links stay correct whether or not site_url has a trailing slash; trim only strips '/' from the ends, leaving "https://" intact. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sy9WFFurEjL8gjCp9fs7bp
This commit is contained in:
parent
6236511024
commit
616111b662
1 changed files with 6 additions and 2 deletions
|
|
@ -13,11 +13,15 @@
|
|||
{{ config.copyright }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{#- trim('/') strips a trailing slash from site_url so the join stays
|
||||
correct whether or not site_url ends in "/" (defensive against future
|
||||
config edits). It only strips '/' from the ends, so "https://" is safe. -#}
|
||||
{% set ai_base = (config.site_url or '') | trim('/') %}
|
||||
<div class="md-copyright__ai">
|
||||
For AI agents:
|
||||
<a href="{{ (config.site_url or '') ~ 'llms.txt' }}" title="Machine-readable site index (llms.txt convention)">llms.txt</a>
|
||||
<a href="{{ ai_base ~ '/llms.txt' }}" title="Machine-readable site index (llms.txt convention)">llms.txt</a>
|
||||
·
|
||||
<a href="{{ (config.site_url or '') ~ 'llms-full.txt' }}" title="Full repository description for AI agents">llms-full.txt</a>
|
||||
<a href="{{ ai_base ~ '/llms-full.txt' }}" title="Full repository description for AI agents">llms-full.txt</a>
|
||||
</div>
|
||||
{% if not config.extra.generator == false %}
|
||||
Made with
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue