Use custom URL if author starts with https://
#125
Labels
No Label
dependencies
in progress
kind/bug
kind/deployment
kind/docs
kind/enhancement
kind/feature
kind/lint
kind/proposal
kind/question
kind/security
kind/testing
kind/translation
kind/ui
lgtm/done
lgtm/need 1
lgtm/need 2
priority/critical
priority/low
priority/maybe
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
status/blocked
status/needs-feedback
status/wip
No Milestone
No Assignees
3 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/theme#125
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "jolheiser/theme:custom-url"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Resolves #124 and would allow for something like
author_domain: github.com
if the author instead has a profile there.I guess the property is already offered by Hugo?
@ -21,3 +21,3 @@
{{- end }}
{{ else }}
<a class="author" href="https://gitea.com/{{ .Params.author | default .Site.Params.author }}">
<a class="author" href="https://{{ .Params.author_domain | default "gitea.com" }}/{{ .Params.author | default .Site.Params.author }}">
Please also adapt it in
#18
.@ -24,3 +24,3 @@
{{- end }}
{{ else }}
<a class="author" href="https://gitea.com/{{ .Params.author | default .Site.Params.author }}">
<a class="author" href="https://{{ .Params.author_domain | default "gitea.com" }}/{{ .Params.author | default .Site.Params.author }}">
Please adapt it in
#21
as well.Which property? If you mean
author_domain
then no, it would be added as meta to a given post.The reason I didn't adapt the multiple
authors
is because this new property would then apply to all of them. Maybe that's more correct, but I wasn't sure if it was worth it.I can change it, though.
Oh, then I misunderstood something drastically:
To me, it first looked like we could write something like
author: https://github.com/test-user
instead, and if it matched a URL, the URL would be taken instead ofhttps://gitea.com/<user>
That might be possible, let me tinker. I want to make sure we don't break any of the past posts.
Ah, the problem with that is we need to be able to get both a URL and a human-friendly name from it, so we would then need to parse
jolheiser
fromhttps://github.com/jolheiser
@delvh Okay, now it will try to infer based on whether the author starts with
http
Unless someone has a username starting with
http
👀Although....honestly in 2023 I should just check for
https://
and call it good. Who would have a profile on an http site anymore....right?What I've just noticed:
We can even handle a username starting with
https://
now, as we should simply use the full link to refer that person then…Allow for author_domain in propsto Use custom URL if author starts with `https://`