hydephp / develop

The HydePHP Source Code Monorepo
https://hydephp.com
MIT License
13 stars 6 forks source link

Improve the author feature to allow more schema fields #1778

Closed caendesilva closed 2 months ago

caendesilva commented 3 months ago

We should include a field for the author's biography. We may also want to support more socials.

We may also want to consider keying the array, to make the username relationship more explicit. This means we would do this for v2.

A good idea could be to utalize the formats and conventions from Jekyll https://github.com/gouravkhunger/jekyll-auto-authors

username1:
  name: 'User 1'
  bio: 'Bio of user 1'
  website: 'http://user1.com'
  socials:
    twitter: '@user1'
    github: 'user1'

username2:
  name: 'User 2'
  bio: 'Bio of user 2'
  website: 'http://user2.com'
  socials:
    twitter: '@user2'
    github: 'user2'

test:
  exclude: true # Skips author from autopage generation only if they have no post assigned.
  name: 'Test user'
  bio: 'Bio of test user'
  website: 'http://test.com'
  socials:
    twitter: '@test'
    github: 'test'
caendesilva commented 3 months ago

Avatar filename or URL?

caendesilva commented 3 months ago

Avatar and bio seems to be the common conventions for these settings

Some use social links as root level entries, but I want them to be arbitrary here, as the user will have to create the Blade views. The idea is that they can match the services to the social key if they want things like images, etc.

caendesilva commented 2 months ago

Fixed in https://github.com/hydephp/develop/pull/1798