Hi, I am running some experiments around creating a new html5 theme. I am stuck, really stuck, on how to produce 'clickable' <articles> that link to actual article content.
You can think of what i want to do as trying to grab the individual links of the toctree and surround each individual link with some <article> tags. There is a further complication - I need metadata (which I can include within the each rst file in the form of fieldlists including say the author, alternate title, image, some teaser sentences, etc). The metadata for each rst file becomes available in the templates while processing the rst file, and yet appears to be unavailable when generating the master toctree. Here is an example that might explain a bit better what I am trying to accomplish. Using the Jinja templates, I am trying to produce html5 code that looks like this (I've annotated my metadata needs with html comments and I am sorry that gmail seems to have screwed up my efforts to pretty print the html): <div id="home"> <div id="main"> <section id="blog-item"> <div class="toctree-wrapper compound"> ----- list of 'clickable' articles - "a special-kind of toctree" ---- <article class="main-blog-item"> <a href="/article/7-29-2011-blog-item"> <!-- need rst name --> <div class="blog-item-header"> <h3>Some Very Big News</h3> <!-- need title --> <div class="striking-image" style="background-image: url(/images/articles/7-29-2011-blog-image.jpg); height:413px;"><!-- need image location --> <h2>A second alternative title for the big news</h2><!-- need alternate title--> <span class="author">by unknown author</span> <!--need author--> </div> </div> <div class="blog-item-content"> <p>There I was thinking that my understanding of how the world worked was ever so clear, and then my whole world changed.</p> <!-- need first sentence of rst file--> </div> </a> </article> <article>...</article> <article>...</article> <article>...</article> ----- end of list of 'clickable' articles - "a special-kind of toctree" -- </div> </section> </div> </div> In summary I have two problems: (1) How can I get metadata for each of individual files. I know that 'meta' is available to the templates when processing a particular rst file, but I need this data when building the table of contents, and I want it on an individual file basis. (2) How can I generate the actual html for each file while separately creating a link for it in the <a href...> tag in my example html5 code. One idea that might work: (a) create a dictionary of toctree links, and some template code to produce the toctree links (in the same way that {{ toctree() }} currently works. (b) create a dictionary for each rst file, containing the meta information for that rst file, and (c) make these dictionaries available to the template processing engine when creating the table of contents. I am a very poor python programmer, so it would take me a long time to implement this idea. Any ideas? Thoughts? Thanks, fkunze -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.