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

Use relative url filter consistently and remove unused post template #182

Merged
merged 5 commits into from
Jun 28, 2024

Conversation

LalitNM
Copy link
Contributor

@LalitNM LalitNM commented Nov 26, 2020

Follow up pull request on #181.

@MarkusPiotrowski I added relative_url at couple of places. But couldn't find any use of

{% for tag in page.tags %}<li class="inline tag_list_item"><a class="tag_list_link" href="/wiki/Category%3A{{ tag | replace:' ','_' }}">{{ tag }}</a></li>{% endfor %}
in website. Can we simply remove this? BTW this has a history at 431d351 and #104.

You can see a live demo of this state of website at https://lalitnm.github.io/biopython.github.io.

Please let me know if this pull request can be improved further.

@peterjc
Copy link
Member

peterjc commented Nov 26, 2020

In reference to the snippet you noted, this works OK on https://biopython.org/wiki/Category:Wiki_Documentation but https://lalitnm.github.io/biopython.github.io/wiki/Category:Wiki_Documentation are currently broken - they still assume an absolute URL starting /wiki/Category...

I guess this needs the same relative URL filter applied here?

@peterjc
Copy link
Member

peterjc commented Nov 26, 2020

I would guess we'll need something like this?

/wiki/Category%3A{{ tag | replace:' ','_' }}

to:

{{ "/wiki" | relative_url }}/Category%3A{{ tag | replace:' ','_' }}

(Untested)

@LalitNM
Copy link
Contributor Author

LalitNM commented Nov 26, 2020

In reference to the snippet you noted, this works OK on https://biopython.org/wiki/Category:Wiki_Documentation but https://lalitnm.github.io/biopython.github.io/wiki/Category:Wiki_Documentation are currently broken - they still assume an absolute URL starting /wiki/Category...

I got you. Let me fix this too.

{{ "/wiki" | relative_url }}/Category%3A{{ tag | replace:' ','_' }}
(Untested)

Let me test this as well.

@LalitNM
Copy link
Contributor Author

LalitNM commented Nov 26, 2020

Now, only one place left where relative_url is not used, i.e.

<a href="{{ post.url }}">

@peterjc as far as I understand, we are not using that layout anywhere in website. Should we also change that file?

Also test this state at https://lalitnm.github.io/biopython.github.io.

@MarkusPiotrowski
Copy link
Contributor

@peterjc as far as I understand, we are not using that layout anywhere in website.

This is also my understanding. This template is for blogs, isn't it? However, if we keep the template then you should also add the filter here. Or delete the template.

@peterjc
Copy link
Member

peterjc commented Nov 26, 2020

I think Markus is probably right - and we might as well fix the currently unused post template.

@LalitNM
Copy link
Contributor Author

LalitNM commented Nov 26, 2020

I'm guessing tag_with_ means tag with underscore?

Yeah, that is what it means.

If it is not possible in one line, how about using category instead of tag_with_, or maybe tag_underscore?

Sure, let me rename it as category.

I think Markus is probably right - and we might as well fix the currently unused post template.

Sure, let me remove that.

@LalitNM LalitNM changed the title Use relative url filter consistently Use relative url filter consistently and remove unused post template Nov 28, 2020
@peterjc
Copy link
Member

peterjc commented Jun 28, 2024

Looks like we forgot about this cleanup work - applying now, thanks!

@peterjc peterjc merged commit 14ccb2d into biopython:master Jun 28, 2024
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.

3 participants