mirror of
https://github.com/inventree/inventree-website.git
synced 2025-04-28 05:26:44 +00:00
make internal stuff relativ
This commit is contained in:
parent
f877e11f5c
commit
f2c7c544c1
@ -10,8 +10,8 @@ description: >-
|
||||
line in _config.yml. It will appear in your document head meta (for
|
||||
Google search results) and in your feed.xml site description.
|
||||
|
||||
baseurl: "/home.invenhost.com" # the subpath of your site, e.g. /blog # TODO change when in prod
|
||||
url: "" # the base hostname & protocol for your site, e.g. http://example.com
|
||||
baseurl: "/home.invenhost.com"
|
||||
url: """
|
||||
|
||||
|
||||
plugins:
|
||||
|
@ -40,12 +40,12 @@
|
||||
- title: Sitemap
|
||||
cats:
|
||||
- name: Home
|
||||
link: /
|
||||
internal: ''
|
||||
- name: For Maker
|
||||
link: /maker
|
||||
internal: maker
|
||||
- name: For Business
|
||||
link: /business
|
||||
internal: business
|
||||
- name: For Education
|
||||
link: /education
|
||||
internal: education
|
||||
- name: About
|
||||
link: /about
|
||||
internal: about
|
||||
|
@ -17,7 +17,7 @@
|
||||
<nav class="list-none mb-10">
|
||||
{% for item in cat.cats %}
|
||||
<li>
|
||||
<a href="{% if item.site %}{{ site[item.site] }}{% else %}{{ item.link }}{% endif %}" class="footer-link">{{ item.name }}</a>
|
||||
<a href="{% include link.html item=item%}" class="footer-link">{{ item.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
|
7
_includes/link.html
Normal file
7
_includes/link.html
Normal file
@ -0,0 +1,7 @@
|
||||
{% if include.item.site %}
|
||||
{{ site[include.item.site] }}
|
||||
{% elsif include.item.internal %}
|
||||
{{ include.item.internal | relativurl }}
|
||||
{% else %}
|
||||
{{ include.item.link }}
|
||||
{% endif %}
|
Loading…
x
Reference in New Issue
Block a user