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
Simple Option to Disable Author Links #982
Comments
Yes, I think an option to disable links on authors' names could be a great improvement. We could also add an option to disable links on publications' title. |
I recently started using this theme and I was looking for an option to link to co-authors homepages instead of having an author page created automatically. I agree with @jessebett here. In addition I'd like to have the possibility to link to an external page like research gate, google scholar or the co-author's homepage. I'm not yet used to Hugo syntax but I am willing to give it a try if someone could drop a few hints on the structure of the theme and which files to consider. |
Hello, I think you should look at this files:
You should not edit these files directly but duplicating them: Just a question do you prefer adding links to co-authors homepages on all publication markdowns files or creating a unique list of co-authors in the config file? If you create a variable in
If you create a varialble in publication markdown file, you can access it
I hope it was clear. If you have questions, I will be happy to help you. Do you want me to provide what I did on my server ? I can also implement linking to personal websites for co-authors. |
I'm interested in linking to co-author's personal websites from each of my publications. I'm new to Hugo, so I'm not too sure what's a clean way to implement this, so I'd certainly be interested in seeing what others have done. |
As @FramboisePi pointed out, you can create a new variable in your individual publication .md files, and change the A simple way of getting rid of author pages/links is therefore to: (1) Delete the (2) Make a copy of (3) Edit the copied |
An option to disable publication link and author link will be very helpful. |
@FramboisePi I would love help on how to do this, if you're offering. Trying to disable author link and can't get step (3) outlined by @pjbouchet to work. |
Hi, @pjbouchet's message is a way to link authors to external websites and not disable link. In order to disable publication and author links, you need to do the following changes:
[publications]
# ... PREVIOUS CODE ... #
# Link the title of the publication to the publication
links_title = false
# Link the authors of the publication to the list of publication made by this author
links_authors = false
Replace <a href="{{ .RelPermalink }}" itemprop="name">{{ .Title }}</a>. by {{ if site.Params.publications.links_title }} <!-- Create a link on the publication title -->
<a href="{{ .RelPermalink }}" itemprop="name">{{ .Title }}</a>.
{{ else }}
<a itemprop="name">{{ .Title }}</a>.
{{ end }} This code is present two times: for
Replace <a href="{{.RelPermalink}}">{{$name}}</a> by {{ if site.Params.publications.links_authors }} <!-- Create a link for authors of the publication -->
<a href="{{.RelPermalink}}">{{$name}}</a>
{{- else -}}
<a>{{$name}}</a>
{{- end -}} I hope this is clear. If you have any question, I will be happy to help you. |
I'm confused, in step 2, where I'm copying This is, in general, something confusing to me about using Hugo. What is the difference between modifying |
@hail2thief If you modify theme files directly, then any modifications you make will be overwritten when you update Academic in the future. Hugo looks for layout files in a specific order (see https://gohugo.io/templates/lookup-order/), so that if you copy the theme files to your website root, they will be read instead of the original theme ones. And to clarify - the solutions I suggested can be used to both disable links and add custom links to co-authors' own personal websites, if necessary. All it does is replace the theme's authors parameter with one you define yourself - and which can be a text string (no links), a formatted text string as in the example I gave (eg. with some names in bold font), or one with links (you can use the Hope this clarifies things. |
Thanks for the clarification @pjbouchet! @FramboisePi 's solution is now working great for the title links, and I'll wait to see what he posts re: disabling the author links. |
Your right @pjbouchet. I should have said that step 1 was not necessary to disable links 😌. A question, do you think I should try to submit a pull request to @gcushen? In my opinion, it would be useful to have this option in Academic, as it allow more customizations for websites. You should replace It was easier as I thought, I updated my messages with code for author's links. |
Perfect!. Thanks! |
+1 for a PR to have an option to disable links on authors |
Returning to my earlier request for tips on linking to external websites for each co-author, I just realized I hadn't tried the obvious thing: just using Markdown inside the existing authors list. It turns out this works for my use case, where I don't actually care to have a profile page on my site for any of my co-authors. In case any other newcomers to might find it helpful, you can see here what I did: For everybody who simply wants to disable links, the most natural way to do this might be to not only disable the link, but to disable the generation of profile pages for any co-author that doesn't actually have an "account" i.e. to disable the generation of any profile pages for any co-author that does not have a file within |
Hi, I created a pull request with the modifications said earlier. The only difference is that options are called I would be happy to improve it with your suggestions. @VictorYing your idea is probably better for authors links but for the moment I don't how to do this. Have you found something new on the subject? |
`link_authors` option added to `params.toml`. Close HugoBlox#982
Has anyone tried to disable author links recently - with a newer version of the academic theme? I tried the steps of @FramboisePi and @pjbouchet which took out the author links on the listing in the recent publication section on the homepage, but entirely removed the authors on the publication page. I cannot see any link_authors option in the params.yaml, and i cant find any params.toml file. |
You might need to copy this file to
into
then rebuild the site, and the link should be disabled. |
@lonizing
Thanks. Worked a treat! |
It appears a recent update added a feature to have the names of authors on publications as hyperlinks which take you to a page listing their publications. I don't think this behaviour should be enabled by default, and at least should have an obvious way to disable it.
My reasoning is that myself and others use this template for a personal academic website, not a homepage for a group. While this feature may be useful for research groups, it is strange to have on a personal site.
Further, within markdown I indicate first authorship with an
*
and also bold my own name in the author list. The current implementation of this feature does not respect either of these. If I put an*
after a first author's name, the author hyperlink directs to an internal page withauthorsname*
which is distinct from the pages directed to from other publications just containingauthorsname
not first authored. Likewise, the markdown bolding on my name in the authors list takes me to a author page, for myself, which is already undesirable behaviour for a personal website. Further, the markdown bolding in the author's list is not respected in the title of the target author page, so that has a title**myname**
.Again, I think this feature should be disabled by default, and have the option to enable it easily with a boolean option in the publications widget configuration.
The text was updated successfully, but these errors were encountered: