Authors
Ce contenu n’est pas encore disponible dans votre langue.
Post authors
Authors can be defined in a blog post using the authors
frontmatter property and must at least have a name
property:
---authors: name: HiDeoo title: Starlight Aficionado picture: https://avatars.githubusercontent.com/u/494699?s=200 url: https://hideoo.dev---
Multiple authors can be defined using an array:
---authors: - name: HiDeoo title: Starlight Aficionado picture: https://avatars.githubusercontent.com/u/494699?s=200 url: https://hideoo.dev - name: Ghost picture: https://avatars.githubusercontent.com/u/10137?s=200 url: https://github.com/ghost---
Global authors
Regular authors can also be defined globally in the Starlight Blog plugin configuration:
starlightBlog({ authors: { hideoo: { name: 'HiDeoo', title: 'Starlight Aficionado', picture: '/hideoo.png', // Images in the `public` directory are supported. url: 'https://hideoo.dev', }, },})
When a blog post frontmatter does not define an author, the global authors from the configuration will be used instead.
A blog post frontmatter can also reference a global author using the key of the author in the configuration:
---authors: - hideoo # Will use the author defined in the configuration with the `hideoo` key. - name: Ghost picture: https://avatars.githubusercontent.com/u/10137?s=200 url: https://github.com/ghost---