سؤال

I see a similar question already been posted, but was down-voted and left unanswered. Also I was not able to find any answer via google search.

I am trying to use Octopress for both blogging and posting articles. But I don't have much experience with it.

Blog pages work fine and are indexed automatically. However other type of pages (for example source/projects/project1/project1.md and source/articles/article1/article1.md) are not indexed in archive nor visible on navigation bar. I can still navigate to them automatically by changing the URL, but otherwise they are hidden.

The question: Is there an easy way to automatically generate some kind of a tree for these deeper files? Maybe some kind of a plugin?

Thanks, KK.

هل كانت مفيدة؟

المحلول

I'm not completely certain how Octopress works, but in Jekyll (which Octopress is based on) you could use the pages accessor to loop through all the pages. It would work something like this:

{% for page in site.pages %}
    <a href="{{ page.url }}">{{ page.title }}</a>
{% endfor %}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top