Skip to content

Add support for an "authors" collection#1

Open
tosky wants to merge 1 commit intobeta-europe:masterfrom
tosky:feat-authors
Open

Add support for an "authors" collection#1
tosky wants to merge 1 commit intobeta-europe:masterfrom
tosky:feat-authors

Conversation

@tosky
Copy link
Copy Markdown

@tosky tosky commented Apr 25, 2021

Handled through the admin UI, it is primarily used
to assign authors to articles.
It may be extended to support additional use cases
(for example team members data).

@tosky tosky requested a review from CKroes97 April 25, 2021 23:46
Copy link
Copy Markdown
Contributor

@CKroes97 CKroes97 left a comment

Choose a reason for hiding this comment

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

I left two comments, looks good for the rest

config.yml Outdated
- name: "authors"
label: "Authors"
folder: "_authors/"
slug: "{{name}}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Using the name as a slug is bad practice since people can have the same first and -last name

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Uh, right, I guess {{ title }} is enough?

- {label: "Image", name: "image", widget: "image", required: false}
- {label: "Thumbnail for Partner Overview", name: "teaser", widget: "image", required: false}
- {label: "Label (e.g. for credit)", name: "credit", widget: "string", required: false}
- name: "authors"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You might want to wrap this in an "{% if site.cms.has_members %}{% raw %}

//your code

{% endraw %}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Shouldn't this be always enabled? Otherwise the link inside the "posts" collection can be broken

Handled through the admin UI, it is primarily used
to assign authors to articles.
It may be extended to support additional use cases
(for example team members data).
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

Successfully merging this pull request may close these issues.

2 participants