How to left justify content in all pages using Ananke

Can’t seem to find what controls this?

How to left justify content

To which content are you referring? The prose is already left-justified when viewing either a content page or a list page.

If by “justify” you mean pulling everything to the left, search the templates for application of the “center” class. For example, in layouts/page/single.html …

<div class="flex-l mt2 mw8 center">

Don’t modify the theme. Instead, override individual templates as needed by copying them to the same path within the layouts directory in the root of your project.

Finally, note that the structure of the Ananke theme’s layouts directory is currently incompatible with Hugo v0.146.0 and later. Yes, we’re using referencing the Ananke theme in our quick start guide, but we’ll replace it with something else if the theme author doesn’t update it soon. See https://github.com/gohugoio/hugoDocs/issues/2548.

The theme currently uses Tachyons as the style system, and the centered text (for instance, on the index page) is created via the tc and tc-l classes. Depending on the location of your issue, look for these classes. On the homepage, for instance, all text is centered. If you want to change this to left-aligned, remove tc-l on this line:

The center class is for the container’s position on the page, and adds margin: 0 auto; to center the whole article container.

And better do this in a copy of index.html in your local tree, not in the theme’s file.

Alas, the removal of the “tc-l” doesn’t cause the left-justifying of the text on the front page any longer. Text remains centered even after “tc-l” removal.

This is with Hugo 0.165.0, current ananke.

Take a look at your p elements in your browser’s developer tools. That should tell you what to change.

on line 3282 of ananke’s assets/ananke/css/_tachyons.css

I changed:

.tc-l { text-align: center; }

to:

.tc-l { text-align: left; }

That will probably not survive an update of the theme, though

I also would not override anything that is defined in Tachyons itself (like .tc-l) and instead choose something along the lines of article.

In Tachyons itself tc refers to text centered. Text left-aligned would start with tl according to that logic.