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 multiauthor feature #46

Merged
merged 3 commits into from
Jan 10, 2025
Merged

add multiauthor feature #46

merged 3 commits into from
Jan 10, 2025

Conversation

mansoorbarri
Copy link
Owner

this PR adds the ability to have multiple authors, fixing #22

@mansoorbarri
Copy link
Owner Author

CC: @natrius

@natrius
Copy link

natrius commented Jan 10, 2025

At first glance it looks good as far as I'm able to tell. Don't forget to mention it in the readme as well - i think there are some users interested in this.

Copy link

cloudflare-workers-and-pages bot commented Jan 10, 2025

Deploying roadster-hugo with  Cloudflare Pages  Cloudflare Pages

Latest commit: 290576d
Status: ✅  Deploy successful!
Preview URL: https://95c9e2a9.roadster-hugo.pages.dev
Branch Preview URL: https://multiauthor.roadster-hugo.pages.dev

View logs

@mansoorbarri
Copy link
Owner Author

I have updated the docs and README, i think it should be already now. merging in 2 hours.

@mansoorbarri mansoorbarri merged commit d669a98 into master Jan 10, 2025
1 check passed
@natrius
Copy link

natrius commented Jan 10, 2025

Hm, i think, i am missing something.

I created quickstart\content\authors\rsmith\_index.md like the mentioned example in gohugoio/hugoDocs#2494 (comment) (and quickstart\content\authors\rsmith2.md as well for testing).
In one of the blog-posts i added in the frontmatter

authorbox: true # Enable authorbox for specific page
authors: ["rsmith", "rsmith2"] # Assuming you have a author profile in /content/authors/exampleauthor.md
---

And all the other stuff. The hugo.toml contains

[Params]
  authorbox = true # Show authorbox at bottom of pages if true
  post_meta = ["author", "date", "categories", "translations"] # Order of post meta information

so it should show, shouldn't it? Don't know if i am missing something. In the public, the authors/rsmith and authors/rsmith2 are created, Visiting http://localhost:1313/roadstertesting/authors/ just shows the file-rsmith2, but not the folder-rsmith.
And visiting http://localhost:1313/roadstertesting/authors/rsmith2/ after that, it does not show the article i added him to.

Maybe i'm really just to tired and missing something.

@mansoorbarri
Copy link
Owner Author

it is working for me, i think its because i forgot to add:

[taxonomies]
  author = "authors" 
  tag = "tags"
  category = "categories"

in the site config.toml. adding that and assuming you have everything setup right in the /content/, it should show up like this:
image

not sure why its not showing the authorbox. fixing that now.

@natrius
Copy link

natrius commented Jan 11, 2025

Yeah, adding them shows in the blog article

grafik

And i can open the page of them both but just the folder rsmith contains information and social links links to the blog-articles. Just so you know. Should maybe changed or better explained in the hugo.toml or in the example configuration as well.
Just in the top besides the date and news the authors are missing (or is this the authorbox?).

EDIT: And if there is no folder, it just links to the name that is input there. Thats good as well :)

@mansoorbarri
Copy link
Owner Author

i tried writing some documentation for this but turns out I am really bad at it. would you mind opening a PR for this?

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