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

added url field to author information in blog post #6038

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/blog/.authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ authors:
name: Martin Donath
description: Creator
avatar: https://avatars.githubusercontent.com/u/932156
url: https://github.com/squidfunk
1 change: 1 addition & 0 deletions docs/plugins/blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,7 @@ The provided path is resolved from the [`docs` directory][mkdocs.docs_dir].
name: string # Author name
description: string # Author description
avatar: url # Author avatar
url: url # Author website link
```

Note that `<author>` must be set to an identifier for associating authors
Expand Down
6 changes: 5 additions & 1 deletion src/blog-post.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@
<img src="{{ author.avatar }}" alt="{{ author.name }}" />
</span>
<span class="md-profile__description">
<strong>{{ author.name }}</strong><br />
<strong>
{% if author.url %}<a href="{{author.url}}">{% endif %}
{{ author.name }}
{% if author.url %}</a>{% endif %}
</strong><br />
{{ author.description }}
</span>
</div>
Expand Down