Comments (3)
Thanks, I see.
I already came across the JS redirect method, but it's a hacky workaround imo. I'd really like to have a proper, direct link in the menu.
I'll look into modifying navbar.liquid
!
from type-on-strap.
For now, I just added this in navbar.liquid
, before the existing loop:
{% for item in site.data.menu %}
<li class="separator"> | </li>
<li>
<a class="clear" aria-label="{{ item.title }}" title="{{ item.title }}" href="{{ item.url}}">
{% if item.icon %} <i class="fas {{ item.icon }}" aria-hidden="true"></i>
{% else %} {{ item.title }} {% endif%}
</a>
</li>
{% endfor %}
And create a file _data/menu.yml
containing a list of menu items (with title and url).
This isn't perfect, as it constrains your external links to be in front (or after) the internal ones, but it's a start.
from type-on-strap.
The links in the navigation bar are added automatically based on the pages in the pages folder (with search, tags, portfolio ...).
So you can't just plug an external link there by default. (We could customize the navbar.liquid
to display some websites from the config.yml
, something that I might look into in the future).
However, If you wish to add a link to an external page, there's a workaround, where you can add a new page which will redirect on load to the external one. For example, adding this github.md
in the pages
folder, I am able to go to the GitHub repository when clicking on the title in the navbar.
---
layout: page
title: GitHub
permalink: /redirect/
---
### Redirecting to the GitHub page ...
<script type="text/javascript">
window.location.href = "https://github.com/sylhare/Type-on-Strap"
</script>
from type-on-strap.
Related Issues (20)
- Workflow action - Getting Error: The process '/opt/hostedtoolcache/Ruby/2.7.2/x64/bin/bundle' failed with exit code 16 HOT 3
- What is the best way to update the repo? HOT 2
- how to add content in the home page without blog posts HOT 7
- Build Ruby Gem: Some jobs were not successful HOT 2
- how should i localize HOT 4
- xml HOT 5
- How to set the first picture on the blog homepage without limiting the height HOT 5
- My class diagram cannot be displayed. HOT 3
- Update to fontawesome 6
- Switch from Google UA to Google GA4 for default analytics HOT 1
- multiple porfolios? HOT 1
- Placement of "blog" in navbar HOT 5
- Enhancing navbar HOT 2
- Multi-line header with HTML tags breaks `twitter:description` `meta` tag HOT 1
- Author name in posts without author-id and config.yml HOT 1
- Portfolio link not ceated correctly? HOT 2
- Auto darkmode does not work HOT 2
- Make the choosen color theme persistent
- Possibility to add legend with the image_aligner
- Comment portfolio on _config.yml "Search broken" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from type-on-strap.