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

Open
wants to merge 2 commits into
base: master
from

Conversation

@PROTechThor
Copy link
Contributor

PROTechThor 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?

PROTechThor added 2 commits Oct 19, 2019
@@ -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 %}>

This comment has been minimized.

@emmapeel2

emmapeel2 Oct 25, 2019

Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.