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 invalid HTML #330

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix invalid HTML #330

wants to merge 1 commit into from

Conversation

mcnesium
Copy link

@mcnesium mcnesium commented Jan 5, 2019

According to the W3C HTML Validator, that line was invalid HTML

Error: Attribute href not allowed on element data at this point.
Error: Element data is missing required attribute value.

So when changing this from href to value, it passes the validation.

[According to the W3C HTML Validator, that line was invalid HTML](https://validator.w3.org/nu/?doc=https%3A%2F%2Fjekyll.github.io%2Fminima%2F)

> Error: Attribute href not allowed on element data at this point.
> Error: Element data is missing required attribute value.

So when changing this from `href` to `value`, it passes the validation.
@mcnesium
Copy link
Author

mcnesium commented Jan 5, 2019

This fixes #211

@tevino
Copy link

tevino commented Aug 14, 2023

This issue occurred to me as well.
I understand that this PR is dated, but the original issue #211 is now locked, I'm sharing some information in hope of getting this PR merged.

Steps

I tried this parser suggested by http://microformats.org/wiki/validators with

the current source of https://jekyll.github.io/minima/
<!DOCTYPE html>
<html lang="en"><head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1"><!-- Begin Jekyll SEO tag v2.8.0 -->
<title>Your awesome title | Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.</title>
<meta name="generator" content="Jekyll v4.3.2" />
<meta property="og:title" content="Your awesome title" />
<meta name="author" content="GitHub User" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description." />
<meta property="og:description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description." />
<meta property="og:site_name" content="Your awesome title" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Your awesome title" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebSite","author":{"@type":"Person","name":"GitHub User"},"description":"Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.","headline":"Your awesome title","name":"Your awesome title","url":"/minima/"}</script>
<!-- End Jekyll SEO tag -->
<link id="stylesheet" rel="stylesheet" href="/minima/assets/css/style.css"><link type="application/atom+xml" rel="alternate" href="/minima/feed.xml" title="Your awesome title" />
</head>
<body><header class="site-header">

  <div class="wrapper"><a class="site-title" rel="author" href="/minima/">Your awesome title</a><nav class="site-nav">
        <input type="checkbox" id="nav-trigger" class="nav-trigger" />
        <label for="nav-trigger">
          <span class="menu-icon">
            <svg viewBox="0 0 18 15" width="18px" height="15px">
              <path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
            </svg>
          </span>
        </label>

        <div class="trigger"><a class="page-link" href="/minima/about/">About</a></div>
      </nav></div>
</header>
<main class="page-content" aria-label="Content">
      <div class="wrapper">
        <div class="home">



  <ul class="post-list"><li>
        <span class="post-meta">May 20, 2016</span>
        <h3>
          <a class="post-link" href="/minima/2016/05/20/welcome-to-jekyll.html">
            Welcome To Jekyll
          </a>
        </h3></li><li>
        <span class="post-meta">May 20, 2016</span>
        <h3>
          <a class="post-link" href="/minima/junk/2016/05/20/this-post-demonstrates-post-content-styles.html">
            This post demonstrates post content styles
          </a>
        </h3></li><li>
        <span class="post-meta">May 20, 2016</span>
        <h3>
          <a class="post-link" href="/minima/misc/2016/05/20/super-long-article.html">
            Some articles are just so long they deserve a really long title to see if things will break well
          </a>
        </h3></li><li>
        <span class="post-meta">May 20, 2016</span>
        <h3>
          <a class="post-link" href="/minima/2016/05/20/my-example-post.html">
            My Example Post
          </a>
        </h3></li><li>
        <span class="post-meta">May 19, 2016</span>
        <h3>
          <a class="post-link" href="/minima/misc/2016/05/19/super-short-article.html">
            Some articles are just so short that we have to make the footer stick
          </a>
        </h3></li></ul>

    </div>

      </div>
    </main><footer class="site-footer h-card">
  <data class="u-url" href="/minima/"></data>

  <div class="wrapper">

    <div class="footer-col-wrapper">
      <div class="footer-col">
        <p class="feed-subscribe">
          <a href="/minima/feed.xml">
            <svg class="svg-icon orange">
              <use xlink:href="/minima/assets/minima-social-icons.svg#rss"></use>
            </svg><span>Subscribe</span>
          </a>
        </p>
        <ul class="contact-list">
          <li class="p-name">GitHub User</li>
          <li><a class="u-email" href="mailto:your-email@domain.com">your-email@domain.com</a></li>
        </ul>
      </div>
      <div class="footer-col">
        <p>Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
</p>
      </div>
    </div>

    <div class="social-links"><ul class="social-media-list"><li>
  <a rel="me" href="https://dev.to/jekyll" target="_blank" title="devto">
    <svg class="svg-icon grey">
      <use xlink:href="/minima/assets/minima-social-icons.svg#devto"></use>
    </svg>
  </a>
</li>
<li>
  <a rel="me" href="https://dribbble.com/jekyll" target="_blank" title="dribbble">
    <svg class="svg-icon grey">
      <use xlink:href="/minima/assets/minima-social-icons.svg#dribbble"></use>
    </svg>
  </a>
</li>
<li>
  <a rel="me" href="https://www.facebook.com/jekyll" target="_blank" title="facebook">
    <svg class="svg-icon grey">
      <use xlink:href="/minima/assets/minima-social-icons.svg#facebook"></use>
    </svg>
  </a>
</li>
<li>
  <a rel="me" href="https://www.flickr.com/photos/jekyll" target="_blank" title="flickr">
    <svg class="svg-icon grey">
      <use xlink:href="/minima/assets/minima-social-icons.svg#flickr"></use>
    </svg>
  </a>
</li>
<li>
  <a rel="me" href="https://github.com/jekyll/minima" target="_blank" title="github">
    <svg class="svg-icon grey">
      <use xlink:href="/minima/assets/minima-social-icons.svg#github"></use>
    </svg>
  </a>
</li>
<li>
  <a rel="me" href="https://scholar.google.com/citations?user=qc6CJjYAAAAJ" target="_blank" title="google_scholar">
    <svg class="svg-icon grey">
      <use xlink:href="/minima/assets/minima-social-icons.svg#google_scholar"></use>
    </svg>
  </a>
</li>
<li>
  <a rel="me" href="https://www.instagram.com/jekyll" target="_blank" title="instagram">
    <svg class="svg-icon grey">
      <use xlink:href="/minima/assets/minima-social-icons.svg#instagram"></use>
    </svg>
  </a>
</li>
<li>
  <a rel="me" href="https://keybase.io/jekyll" target="_blank" title="keybase">
    <svg class="svg-icon grey">
      <use xlink:href="/minima/assets/minima-social-icons.svg#keybase"></use>
    </svg>
  </a>
</li>
<li>
  <a rel="me" href="https://www.linkedin.com/in/jekyll" target="_blank" title="linkedin">
    <svg class="svg-icon grey">
      <use xlink:href="/minima/assets/minima-social-icons.svg#linkedin"></use>
    </svg>
  </a>
</li>
<li>
  <a rel="me" href="https://micro.blog/jekyll" target="_blank" title="microdotblog">
    <svg class="svg-icon grey">
      <use xlink:href="/minima/assets/minima-social-icons.svg#microdotblog"></use>
    </svg>
  </a>
</li>
<li>
  <a rel="me" href="https://www.pinterest.com/jekyll" target="_blank" title="pinterest">
    <svg class="svg-icon grey">
      <use xlink:href="/minima/assets/minima-social-icons.svg#pinterest"></use>
    </svg>
  </a>
</li>
<li>
  <a rel="me" href="https://stackoverflow.com/users/1234567/jekyll" target="_blank" title="stackoverflow">
    <svg class="svg-icon grey">
      <use xlink:href="/minima/assets/minima-social-icons.svg#stackoverflow"></use>
    </svg>
  </a>
</li>
<li>
  <a rel="me" href="https://t.me/jekyll" target="_blank" title="telegram">
    <svg class="svg-icon grey">
      <use xlink:href="/minima/assets/minima-social-icons.svg#telegram"></use>
    </svg>
  </a>
</li>
<li>
  <a rel="me" href="https://twitter.com/jekyllrb" target="_blank" title="twitter">
    <svg class="svg-icon grey">
      <use xlink:href="/minima/assets/minima-social-icons.svg#twitter"></use>
    </svg>
  </a>
</li>
<li>
  <a rel="me" href="https://www.youtube.com/jekyll" target="_blank" title="youtube">
    <svg class="svg-icon grey">
      <use xlink:href="/minima/assets/minima-social-icons.svg#youtube"></use>
    </svg>
  </a>
</li>
<li>
  <a href="https://jekyll.github.io/minima/feed.xml" target="_blank" title="rss">
    <svg class="svg-icon grey">
      <use xlink:href="/minima/assets/minima-social-icons.svg#rss"></use>
    </svg>
  </a>
</li>
</ul>
</div>

  </div>

</footer>

<div class="sub-footer">
  <div id="skin-switch-container">
    Page rendered with the <select id="skin-switch" onchange="changeSkin()">
      <option value="dark.css">dark</option>
      <option value="style.css">classic</option>
      <option value="solarized-dark.css">solarized-dark</option>
      <option value="solarized-light.css">solarized-light</option>
      <option value="auto.css">auto</option>
      <option value="solarized.css">solarized</option>
    </select> skin of Minima theme.
  </div>
</div>

<script>
  document.getElementById("skin-switch-container").style.display = "block";
  var metaTag = document.getElementById("stylesheet");
  var SSHref = metaTag.href;
  var SSName = (SSHref.substring(SSHref.lastIndexOf('/') + 1));

  document.getElementById("skin-switch").value = SSName;

  function changeSkin() {
    metaTag.href = SSHref.replace(SSName, event.target.value);
  }
</script>
</body>

</html>

and a modified version (see below)

Result

Markup items[0].properties.url
Current master <data class="u-url" href="/minima/"></data> ""
As the PR suggests <data class="u-url" value="/minima/"></data> "/minima/"

CC @DirtyF @barryf @aviau

briandrum added a commit to briandrum/jekyll4-theme-optima that referenced this pull request Apr 23, 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.

None yet

3 participants