Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs

Dashboard
Notifications
Mark all as read
Q&A

With Datenstrom Yellow SSG, how do I generate lists of tags and recent posts for my blog?

+4
−0

I would like to use a static site generator to create a personal blog. I'm new to SSGs (but not to blogs). Following some initial research and recommendations, I chose Datenstrom Yellow for its apparent simplicity (Markdown source and an easy "build" step to generate HTML, which I can then upload to my server when ready). I'm stuck at page layout.

I'm using the blog extension and can run the example just fine. The documentation on that page shows example Markdown for (a) a list of latest posts and (b) a list of tags. What I can't figure out from the documentation, or experimentation, is where to insert that Markdown to produce the desired effects.

From their readme:

Showing list of tags:

[blogtags /blog/]
[blogtags /blog/ 3]
[blogtags /blog/ 10]

Showing list of pages:

[blogpages /blog/]
[blogpages /blog/ 10 Datenstrom]
[blogpages /blog/ 10 - example]

There is also a layouts directory, which contains a likely target, blogpages.html, which the description says is the layout for the main page. Two problems: first, that's HTML not Markdown, and second, it's actually full of PHP (which is Greek to me).

What do I edit to cause the lists of tags and recent posts to show up on the blog page? A search took me to this example site, built with this tool, that has these lists (in the right column), but I can't find source to look at. That site looks to be the work of a beginner who's a little ahead of me on the learning curve; it's not a production site.

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+1
−0

The answer turns out to be to add a sidebar, which is a separate element. First, you have to use the Berlin theme, not the default. This theme adds a line to system/layouts/default.html:

<div class="<?php echo "content".($this->yellow->page->isPage("sidebar") ? " with-sidebar" : "") ?>">

For some reason the blog templates don't get updated when you switch to this theme, so edit that line into blog.html and blogpages.html.

Next, you need to create the actual sidebar page. In the shared content folder, add sidebar.md as in the following example:

---
Title: Sidebar
Status: shared
BlogLocation: /blog/
BlogNewLocation: /blog/@year/@month
---

Tags

[blogtags /blog/ 10]

Archive

[blogarchive /blog/ 50]

In blogtags and blogarchive, the last argument is the number of entries to show. I haven't yet figured out how to show all tags, or all archive months, on one page.

These changes add the sidebar to all pages on the web site. Mine is, first and foremost, a blog, but if you have other types of content in their own sections, you might not want your blog archives to show up in, say, your portfolio. I suspect that deleting that line from default.html, so only the blog templates have it, would accomplish that, but I haven't tried it.

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!

Like what we're doing? Support us! Donate