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

Add support for an "authors" collection #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tosky
Copy link

@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
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
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
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?

@@ -105,6 +106,23 @@ collections: # A list of collections the CMS should be able to edit
- {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
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
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