Git Product home page Git Product logo

zerm's Introduction

zerm

a minimalist and dark theme for Zola.

Screenshot

Live Preview!

Largely a port of Radek Kozieł's Terminal Theme for Hugo. 4/5ths of my way through porting this theme, I discovered Paweł Romanowski own independent fork for Zola, Terminimal, which helped me get the PostCSS to Sass styling conversion done more quickly. My sincerest thanks to both of you!

differences

This theme is largely true to the original by Radek, but there are some mild differences. They are almost all stylistic in nature and are intended to emphasize minimalism even more. Some of them are as follows:

  • tags are now included in a post's meta data.
  • no post image previews.
  • categories are included in the taxonomy.
  • bullet points have slightly more margin and different symbols for nesting.
  • no social media or comment support.

Some of these might be added later and PR's are always welcomed.

configuration

Please follow the Zola documentation for how to use a theme.

In config.toml, you will find all values for customization that are supported thus far have documentation explaining how they are used. If there is any confusion or something is not working as intended, please open an issue!

math

You can use KaTeX for mathematical typesetting. Assets are only available if you opt-in on a per-page level through a single line (math=true) on the extra section of the page frontmatter.

# index.md
+++
title="this page title"
...

[extra]
math=true
+++

Content

Pages wich doesn't opt-in are not affected in any way, so you doesn't have to worry about any performance hit.

license

MIT. See LICENSE.md for more details.

zerm's People

Contributors

abhikjain360 avatar adworacz avatar austinwise avatar damccull avatar djacu avatar dsiher avatar ebkalderon avatar ejmg avatar gicrisf avatar jseung5 avatar kartva avatar leodido avatar phrohdoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

zerm's Issues

Code blocks with line numbers have table formatting.

Inserting a code block with linenos turns it into a table.

From the zola documentation on Syntax Highlighting:

When line numbers are active, the code block is turned into a table with one row and two cells. The first cell contains the line number and the second cell contains the code. Highlights are done via the HTML tag. When a line with line number is highlighted two tags are created: one around the line number(s) and one around the code.

As you can see from the examples below, the styling does not look great for a code block. Would it be possible so that code blocks to not have this styling applied to them? I noticed that when you have a code block, regardless of whether it has line numbers enabled or not, it is wrapped in <pre> and <code> tags. Not sure if this is helpful but it is different than tables which are not nested in other tags.

Without linenos

```python
try:
    from jupyter_client.kernelspec import install_kernel_spec
except ImportError:
    from IPython.kernel.kernelspec import install_kernel_spec
from IPython.utils.tempdir import TemporaryDirectory
```

image

With linenos

```python,linenos
try:
    from jupyter_client.kernelspec import install_kernel_spec
except ImportError:
    from IPython.kernel.kernelspec import install_kernel_spec
from IPython.utils.tempdir import TemporaryDirectory
```

image

It request fonts with invalid path.

It seems to be a problem when uri has path.

e.g., when uri is example.com/blog, it should get fonts from example.com/blog/assets/fonts/some-font.woff.
but it sends request to example.com/assets/fonts/some-font.woff and receives HTTP 404.

You may want to visit my page for details. (that hasn't any contents)

list_pages macros references non-existent paginator.pages

index.html's main block invokes the list_pages macro which references paginator.pages which, out of the box, does not seem to exist:

$ zola serve
Error: Failed to render section 'content/_index.md'
Reason: Failed to render 'index.html': error while rendering macro `lists::list_pages`
Reason: Variable `paginator.pages` not found in context while rendering 'macros/lists.html'

I am using zola 0.12.2 and zerm 5ca1968a1a88660aa23c8dc51bc9994bb9fdfceb.

Is this a zerm issue or did I miss a required configuration option (or global(?) frontmatter)?

Make code blocks scrollable horizontally

It seems that code blocks currently default to word-wrapping the text horizontally instead of allowing the reader to scroll left and right. This means that code samples published with this theme that drift rightward end up being wrapped, breaking their formatting and readability. This could be fixed by adjusting overflow, I think?

update README

things that should probably be added:

  • credits to major contributors
  • enumerating all features
  • explicit documentation for more complicated/niche features

update guide for setting up blog theme

it would be nice for users to have a straight forward guide that explains a viable blog structure/setup for using this theme out of the box. things have probably changed since i first published the theme, etc.

Arbitrary URLs in Menu

See discussion in #23.

As it exists, you can't add URLs to external sites to the menu using the existing config options and templating logic because the base URL, example.com etc, is always prepended.

Inline code line breaking

Inline code (`like so`) has white-space: normal set, which makes it break:
like
so

instead of carrying over to the next line.
like so

Disqus template

I see there's a 'comments.html' macro available. How would someone go about putting a disqus snippet in there properly with your template?

Thanks.

tags/categories ignore draft config for a post

it would be nice if the templating for enumerating tagged/categorized posts ignore any given post with draft set to true. this would mean that someone could publish on their blog drafts and be able to link to it without worrying about it being seen by the public before its ready.

Incompatibility with Zola 0.14 - `default_language`

<html lang="{{ config.default_language }}">

After messing around with Zola 0.14, I think there's an incompatibility due to how we were referencing the default language before.

Looking at the changelog, it appears that the config object has been stripped down.

I haven't had a chance to do more debugging yet, but I wanted to open this issue to raise awareness. I'll likely take a crack at fixing it myself soon, but not sure when that will be just yet.

Edit: I think that we can just switch this to lang instead of config.default_language but I'm not sure yet without trying.

Custom 404 page

Hey @ejmg ,
I am trying out this theme for my website. One thing I would like to know is creating a 404 page. I tried out what was given in the zola docs, but I get this error:

Error: Failed to render '404.html' (error happened in a parent template)
Reason: Variable `current_path` not found in context while rendering '404.html'

I placed the 404.html file in the templates/ directory, with the following content:

{% extends "index.html" %}

{% block content %}
    <div class="post">
        <h1 class="post-title">404: Page not found</h1>
        Sorry. non-existent
    </div>
{% endblock content %}

Is there anything else I should do? Can you please help?

`zola serve` fails because of `config.extra.show_author = true`

zola serve fails because of show_author = true even though config.extra.author = "papojari". With show_author = false it works.

➜ zola serve
Building site...
Checking all internal links with anchors.
> Successfully checked 0 internal link(s) with anchors.
-> Creating 16 pages (0 orphan), 3 sections, and processing 0 images
Error: Failed to render section '/git-repos/papojari.codeberg.page/content/authors/_index.md'
Reason: Failed to render 'section.html': error while rendering macro `posts::section_meta`
Reason: Macro `author` is missing the argument `page`

Menu link to external site

Hello,

I would like to know how to create a link to an external site in the menu, looked at the sample configuration files but I can't find a way. $BASE_URL always prepend...

Thanks in advance!

add default 404 page

#5 brings up the fact i was lazy and never got around to upstreaming a 404 page for zerm. that should be fixed.

Code block syntax highlighting

Hello,

I couldn't get Code block syntax highlighting to work. i.e. text in the entire code block has the same colour.
I have cloned a zerm from scratch, ran it without modification / with different themes, the behaviour persisted. Is this intended?

zerm:
圖片

What I'd expect:
圖片

Thanks for the amazing project, have a nice day :)

Unused extended_header ?

Hello,

I don't know if this is normal, but the extended_header macro is never used in the index template (or any other template)? Could you explain why? Am I missing something?

Thanks for this amazing theme!

Fails on `zola serve`

Hi, thanks for making this!

I cannot get these theme to render. I have tried forking the repo, also tried the instructions of adding this theme to existing repo, but both fail with errors like:

Error: Failed to render section '/home/pfes/my-app/content/_index.md'
Reason: Failed to render 'index.html': error while rendering macro `head::styling`
Reason: Function call 'get_url' failed
Reason: `get_url`: Could not find or open file style.css

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.