vito / booklit

a pretty lit content authoring system
https://booklit.page
MIT License
176 stars 55 forks source link

anchor tags should use `id` instead of `name` attribute #20

Closed jtarchie closed 5 years ago

jtarchie commented 5 years ago

We are using tools to validate that links in our site. The link checker keeps returning that anchor links (#) are invalid.

After investigation, we found that the name attribute was being used for the anchors. The name attribute is obsolete in HTML5 having been replaced with id behavior.

The HTML generated has a doctype for HTML5. Would you accept a PR to be HTML5 compliant?

jtarchie commented 5 years ago

It looks like these are places to change it:

  1. https://github.com/vito/booklit/blob/91afb086a9e5f0df87d1fa793d8e7d82e09cc7b2/render/html/target.tmpl#L1
  2. https://github.com/vito/booklit/blob/91afb086a9e5f0df87d1fa793d8e7d82e09cc7b2/render/html/section.tmpl#L1
jtarchie commented 5 years ago

PR merged. Closing.