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

Fix additional links being shown with an empty #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sttz
Copy link

@sttz sttz commented May 10, 2015

In project pages, additional links that don't contain a subpath (e.g. domain.com instead of domain.com/path) are shown with an empty title, i.e. not appearing at all in the rendered page.

The behavior of the code for additional links is also not in sync between the index page and project pages. The index pages compares the strpos result to !== false (does not contain) whereas the project page compares it to !== 0 (does not begin with), which causes the issue.

This pull requests fixes the issue and brings the behavior on the main page and project pages in line, always checking if the link contains a /.

I'm not sure if the behavior of this title-parsing is very useful anyway. I think it would be clearer to always show the link as it was entered and provide an optional title field in the xml to set the title manually.

sttz added 2 commits May 10, 2015 15:20
contain a subpath (e.g. domain.com instead of domain.com/path)
on project pages.

This brings the behaviour of additional links in project pages in
line with the index page, which already uses "!== false" instead
of "!== 0".
parse out the domain, use the full result of parseLink as title by
default and provide the option override the title in the xml using
the linktitle field.
@sttz
Copy link
Author

sttz commented May 10, 2015

I went ahead and implemented my suggestion as well. Now the link title is the output of parseLinkby default and can be set manually in the xml using a linktitle field.

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.

None yet

1 participant