Skip to content

Commit

Permalink
Add External Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
yousinix committed Feb 20, 2019
1 parent 6c11fb3 commit d6d4785
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _includes/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% assign pages = site.html_pages | sort: 'weight' %}
{% for site_page in pages %}
{% if site_page.title %}
<a class="nav-item nav-link{% if page.url contains site_page.permalink %} active {% endif %}" href="{{ site_page.permalink | relative_url }}">{{ site_page.title }}</a>
<a class="nav-item nav-link {% if page.url contains site_page.permalink %} active {% endif %}" href="{% if site_page.external_url %} {{ site_page.external_url }} {% else %} {{ site_page.permalink | relative_url }} {% endif %}">{{ site_page.title }}</a>
{% endif %}
{% endfor %}
</div>
Expand Down
16 changes: 16 additions & 0 deletions docs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,22 @@ To change the favicon for example just generate your own using [favicon](https:/
1. The new page will be added to the navigation bar of your project.
1. Check more pages templates from [here]({{ site.repo }}/tree/master/pages).

#### Adding External Page

1. Add `page-name.html` or `page-name.md` to `pages/`, `new subfolder` or to `root directory` of your project.
1. Add [front matter](https://jekyllrb.com/docs/front-matter/) to the top of your new page.

```yaml
---
layout: null
title: Page Name
weight: 6
external_url: https://google.com/
---
```

1. The new page will be added to the navigation bar of your project and will redirect to the external URL.

#### Adding new Skill

- Add the following lines to `_data/programming-skills.yml` or `_data/other-skills.yml`.
Expand Down
6 changes: 6 additions & 0 deletions docs/github.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
layout: null
title: <i class="fab fa-1x fa-github"></i>
weight: 6
external_url: https://github.com/YoussefRaafatNasry/portfolYOU
---

0 comments on commit d6d4785

Please sign in to comment.