Comments (9)
@chipset95 actually I had a look at the code and the sections are hardcoded, and the navigation bar is not sorted on section tile (I fixed that actually after I forked the timeline repository).
So if someone wants to change the order of the section, he/she has to edit the includes/index.html, which is reasonable given that this the intention is by definition a hard change in the theme π
I'm closing this issue.
from personal-jekyll-theme.
I didn't get it. There is no index.html in includes. Also, where are the sections being hardcoded?
from personal-jekyll-theme.
My bad, it's the index.html layout π
from personal-jekyll-theme.
I've tried changing the order in _layouts/index.html
But the order remains to be About, Blog, Career, Contact.
Just tried it again.
from personal-jekyll-theme.
You mean that the order in the navigation bard remained the same?
The navigation bar is ordered based on the order that the list in the _config.yml is declared.
from personal-jekyll-theme.
I'm able to change the order in the navigation bar from _config.yml, but I want to change the order in index.html to match the order in navigation bar.
I have this in index.html under layouts right now
<!-- Index Layout Start -->
<!DOCTYPE html>
<html lang="{{ site.lang }}">
{% include head.html %}
<body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">
{% include navigation.html %}
{% include header.html %}
{% for page in site.pages %}
{% if page.section-type == "about" %}
{% include about.html %}
{% elsif page.section-type == "work" %}
{% include work.html %}
{% elsif page.section-type == "contact" %}
{% include contact.html %}
{% elsif page.section-type == "latest-post" %}
{% include latest-post.html %}
{% endif %}
{% endfor %}
{% include footer.html %}
{% include js.html %}
</body>
</html>
<!-- Index Layout End -->
And the result of this can be seen here
from personal-jekyll-theme.
I see. Yes it makes sense, given that they are being rendered based on the order that they exist in the site.pages.
We should be smarter, I think we should iterate over the navigation items, given that each section should anyway be listed in the navigation bar π
Re-opening the issue as a bug.
from personal-jekyll-theme.
Exists a problem obtain each page if not use {% for page in site.pages %}
I intent obtain the _include file using:
{% for p in site.pages_list %}
{% if p == "blog" %}
{% include latest-post.html %}
{% else %}
{% include about.html %}
{% endif %}
{% endfor %}
But I do not know as obtain the specific content for the page (for example in about.html in the root path).
The Blogs item is different to the file name, because I added an exeption:
Pages in Home:
'about' => about.html
'blog' => latest-post.html (X)
'career' => career.html
'contact' => contact.html
I don't know many YAML. ΒΏAny idea for solve this?
from personal-jekyll-theme.
Fixed in my latest pull request #56 with:
{% for p in site.pages_list %}
{% for page in site.pages %}
{% if p[1] == page.section-type%}
{% include {{ page.path }} %}
{% endif %}
{% endfor %}
{% endfor %}
It is optimizable if the page is directly obtained back to repeat each time. But it works.
I refactored some problems.
The test run: https://www.livecoding.tv/video/personal-jekyll-theme-27/
from personal-jekyll-theme.
Related Issues (20)
- Add static text to prefix typed text. HOT 1
- Highlight codeblocks
- Public Docker image for use Personal-jekyll-theme HOT 9
- Link in Repo Header doesn't work any more HOT 6
- Demo site not online. HOT 1
- Minimize output html
- Combine output css files into one
- Combine output javascript files into one
- Added designed.html HOT 1
- How to use this theme in Hosting sites ? HOT 2
- Generate intermediate blog collection pages for year, month and date HOT 3
- Disqus comment block not showing up on production HOT 10
- How to use Particle.js for landing wallpaper image
- Baseurl issue HOT 1
- I need help adding a portfolio page HOT 8
- resizing should be avoided when using dynamic-typing with multiple lines
- Links to cross-origin destinations are unsafe
- Example Github Pages site is served not from the master branch HOT 2
- GitHub Pages failed to build your site. HOT 1
- Empty archives and blogs list page HOT 2
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 personal-jekyll-theme.