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

Printing meta for logs #3

Open
tothlp opened this issue Jun 4, 2024 · 2 comments
Open

Printing meta for logs #3

tothlp opened this issue Jun 4, 2024 · 2 comments

Comments

@tothlp
Copy link

tothlp commented Jun 4, 2024

Hey there, I was curious about your template, and found the following in Post layout:

<div class="meta-values" style="padding-bottom: var(--padding-broad);">
    {% for item in page.meta %}
        {{ item | last }}
        {% if forloop.last %}{% else %} • {% endif %}
    {% endfor %}
    • <a href = "{{ page.link }}"> Link </a>
</div>

In theory, the meta tags should print, but they don't. I believe, that instead of the following format,

meta-people: James Stewart, K Roméy
meta-pub: HarperCollins

you should use:

meta:
  people: James Stewart, K Roméy
  pub: HarperCollins

And inside the post layout:

<div class="meta-values" style="padding-bottom: var(--padding-broad);">
    {% for item in page.meta %}
        {{ item.last }}
        {% if forloop.last %}{% else %} • {% endif %}
    {% endfor %}
    • <a href = "{{ page.link }}"> Link </a>
</div>

I am sorry if it is no interest to you, but though I'd help. :)

@hfactor
Copy link
Owner

hfactor commented Jun 7, 2024

Thanks a lot of going through my stupid code. The code is broken, not following the basic logic, and I have made some more changes, making it more complex! :D

Regarding the meta, it's not getting published since I don't have added those info to any front-matter, other than for testing purpose. I initially wanted to group meta, but that's not supported in Obsidian properties, hence I went with meta-people, meta-pub etc. Will clean up as soon as I can!

I am making some more modifications, and I would love if you can help me in code-review. (Probably will be updating by mid June.)

@tothlp
Copy link
Author

tothlp commented Jun 10, 2024

That sounds great! I am not a pro at all with templates, but I will try helping out :)

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