Documentation for developing Siteleaf themes can be found below:
- http://learn.siteleaf.com - for v2 sites
- http://v1.siteleaf.com/help/themes/ - for v1 sites
Siteleaf v1 theme documentation
Home Page: http://www.siteleaf.com
Documentation for developing Siteleaf themes can be found below:
Hey guys,
I'm having a bit of trouble building an array of all the categories for blog posts on a site I'm working on.
On the index page it renders the names of the categories for the listed posts but as soon as I click into a post it limits it to just the tags for that post. We use the categories as a nav on the site so I need it to render all tags for all posts no matter the page.
As per usual, I'm sure it's something simple that I'm doing wrong but I went through Jonnie's post on Taxonomy and the docs and I can't seem to figure a way of changing the scope to be global rather than per post.
Thanks
Hey guys,
I'm pretty sure this is just me doing something wrong but I wanted to check. I'm trying to clean up my code and I'm moving away from multiple index files.
I now have one index.html in the root directory and in it I've added this block
{% if slug == 'teaser' %}
{% include 'includes/teaser' %}
{% elsif slug == 'blog' %}
{% include 'includes/blog' %}
{% endif %}
Both those includes are at those paths.
Also when I duplicate the root index.html and put it in a /blog directory it renders the page correctly.
Thanks in advance
Hey guys,
I'm looking for a way to set a conditional navigation element if the page I'm on is a subpage or post of one of my top level pages.
I have my site divided up into sections all of which are pages and then I add posts and subpages—even subpage posts from time to time—but I always want my top nav link to lead back to this top level pages.
Is there a query for whether something has a parent, or is a child.
I'm guessing adding some metadata might also help me here but I thought it best to ask if there was an inbuilt way of doing it first.
Thanks for any help.
The code below is how I've got my nav working on my site but in the archive section the link renders as the current directory, not the parent.
<header class="site-header">
{% if type == 'page' %}
<a href="{{current.url}}">
<h1>{{current.title}}</h1>
</a>
{% elsif type == 'archive' %}
<a href="{{previous.url}}">
<h1>{{current.title}}</h1>
</a>
{% elsif type == 'post' %}
<a href="{{parent.url}}">
<h1>← {{parent.title}}</h1>
</a>
{% endif %}
</header>
Are archive pages children of pages? If not can you guys point me in the right direction for getting this back up one level.
The url structure for my site is
kilmc.com/writing
kilmc.com/writing/blog-post-name
kilmc.com/writing/archive
And so I can't just send it back to the root directory, I want to keep people in the writing section.
Thanks
I've forked the theme Balzac and been trying to adapt it to my site.
I found that in the nav bar:
<li>
<a href="{{ page.url }}" title="{{ page.title }}">{{ page.title }}</a>
</li>
The About page, whose page.url
should be /about
but is always rendered /
. Other nav items work fine. I can't figure out what went wrong.
Okay, so I'm trying to paginate my blog page. So far this is what I have:
{% if next or previous %}
<div class="pagination">
{% if previous %}
<a href="{{ previous.url }}" class="older">Older</a>
{% else %}
<span class="inactive">Older</span>
{% endif %}
<span>·</span>
{% if next %}
<a href="{{ next.url }}" class="newer">Newer</a>
{% else %}
<span class="inactive">Newer</span>
{% endif %}
</div>
{% endif %}
But that doesn't work the way I want it to — the pagination links simply take me to the next page of the site (e.g. "work") rather than the next blog page (e.g. /page2/, or /2/).
How can I set up my pagination to paginate the blog page itself rather than the entire site (without having to use an archive page)?
I'm trying to add a section to my site which lists all the vinyl I've bought as a reference for when I'm out hunting for new ones to add to my collection.
I'm using https://github.com/jlord/sheetsee.js/ to create a database for myself without the need for a backend. It just relies on js and pulls from a Google Spreadsheet.
The problem is that it uses moustache and when I put this through Siteleaf all of the Sheetsee variables for pulling in the spreadsheet data get ripped out. I've tried escaping the curly braces but that doesn't seem to do it.
Would it be possible to add a list of files or directory's to skip from compiling to allow for something like this to work. If not, do you have any other thoughts on other ways it might be possible to get it working.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.