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

Validator errors in the template #81

Closed
wants to merge 2 commits into from

Conversation

enjeck
Copy link
Contributor

@enjeck enjeck commented Oct 19, 2019

This is an attempt to fix this issue
The continuation of this fix is at this pull request.

@emmapeel2 @gusgustavo As seen here, there are several duplicate IDs. These duplicate IDs do not show up in the code, and I think this is because lektor automatically atrributes them based on the contents.lr file. From what I noticed, if headers have identical text, they automatically get identical IDs. Am I wrong? Is there anything I can do about it?

@@ -1,10 +1,10 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" {% if bag('alternatives', this.alt, 'direction') == 'text-right' %}dir="rtl"{% endif %}>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" {% if bag('alternatives', this.alt, 'direction') == 'text-right' %}dir="rtl"{% endif %}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you add the language 'en', but the template will be used also in other languages, so maybe you need to add some template tags with 'if's like the one about the rtl and ltr text at the end of the same line:
{% if bag('alternatives', this.alt, 'direction') == 'text-right' %}dir="rtl"{% endif %}
(but of course different, related to the language)

@emmapeel2
Copy link
Contributor

emmapeel2 commented Oct 25, 2019

These duplicate IDs do not show up in the code, and I think this is because lektor automatically atrributes them based on the contents.lr file. From what I noticed, if headers have identical text, they automatically get identical IDs. Am I wrong? Is there anything I can do about it?

Sorry, no idea how to fix this. It seems a problem of the plugin that generates anchors from the titles, there is a ticket open on the plugin bugtracker:
lektor/lektor-markdown-header-anchors#9

@hiromipaw hiromipaw self-assigned this Apr 2, 2020
@gabelula gabelula closed this Feb 15, 2022
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.

4 participants