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

plugins/news: Add support for multiple post authors #111

Merged
merged 2 commits into from
Jul 2, 2020

Conversation

Holzhaus
Copy link
Member

Now you can specify multiple post authors (comma separated), e.g.:

title: Multiple Authors Demo
author: Be., Pegasus, Albert, Holzhaus
date: 2020-06-20 12:00:00

Useful for #110.

Now you can specify multiple post authors (comma separated), e.g.:

    title: Multiple Authors Demo
    author: Be., Pegasus, Albert, Holzhaus
    date: 2020-06-20 12:00:00
ywwg added a commit to ywwg/website that referenced this pull request Jun 20, 2020
(<a href="https://github.com/{{ post.author_github }}">@{{ post.author_github }}</a>)
{% endif %}
</span>
{% if author.url %}<a href="{{ author.url }}">{{ author.name }}</a>{% else %}{{ author.name }}{% endif %}{% if author.github %} (<a href="https://github.com/{{ author.github }}">@{{ author.github }}</a>){% endif %}</span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why this is a single line?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because otherwise it will insert newlines into the HTML source, which creates a space before the comma.

<span class="author">{% if author.url %}<a href="{{ author.url }}">{{ author.name }}</a>{% else %}{{ author.name }}{% endif %}{% if author.github %} (<a href="https://github.com/{{ author.github }}">@{{ author.github }}</a>){% endif %}</span>,
{% endfor %}
{% for author in authors|slice:"-2:-1" %}
<span class="author">{% if author.url %}<a href="{{ author.url }}">{{ author.name }}</a>{% else %}{{ author.name }}{% endif %}{% if author.github %} (<a href="https://github.com/{{ author.github }}">@{{ author.github }}</a>){% endif %}</span> and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not very familiar with cactus, but is there any way to reduce the duplication using a macro or smth?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. We could put it into a separate template and include that here, but that also would also lead to superfluous newlines

@Holzhaus
Copy link
Member Author

@ywwg we forgot to merge this prior to the BLM post.

@Be-ing
Copy link
Contributor

Be-ing commented Jun 30, 2020

Now there is a merge conflict.

@Holzhaus
Copy link
Member Author

Now there is a merge conflict.

Resolved.

@ywwg
Copy link
Member

ywwg commented Jul 1, 2020

oh yeah we need to get this in

@rryan rryan merged commit 4e19364 into mixxxdj:website Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants