Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default templates not used? #156

Open
paravoid opened this issue Feb 17, 2025 · 1 comment
Open

Default templates not used? #156

paravoid opened this issue Feb 17, 2025 · 1 comment

Comments

@paravoid
Copy link
Contributor

OK forgive me if this is a stupid question, as I may be missing something major in the new template functionality:

  1. lowdown.1 says: "If not explicitly set with --template, a default template is produced as follows …"
  2. But later on, under FILES, there is a list of files (under share/), with a description of "The default template used if --template is not provided to -t[…]"

I tried modifying the -tman template on the filesystem and no changes were made in the output.

Looking at the code, as far as I can tell nothing reads the templates under /usr/share/, and the default output is just generated in code e.g. bn = bqueue_block(st, obq, ".\\\" -*- mode: troff; coding: utf-8 -*-");.

I started looking at this trying to figure out whether I should ship the templates with the liblowdown2 package or the main lowdown package, but if it turns out I don't need to ship them at all, that would be even easier 😄

@kristapsdz
Copy link
Owner

Good point with misusing the term "default" on my part.

When lowdown is used without --template, it produces meaningful defaults, but it doesn't actually use the templates in share. I do this intentionally to avoid loading up files whenever lowdown is started. So the default is hard-coded. The files in share behave similarly, but aren't used by the system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants