Giter Site home page Giter Site logo

Comments (5)

sebastianbenz avatar sebastianbenz commented on June 25, 2024

Every page should contain a canonical link to itself, e.g.

<link rel="canonical" href="Hello_World.html">

in https://amp-by-example.appspot.com/Hello_World.html

Is there something wrong with the link?

from amp-by-example.

jkingyens avatar jkingyens commented on June 25, 2024

I'm seeing this in my "gulp validate" task branch as well. However, the example html files appear fine according to the spec. The odd thing is Hello_World.html is passing for me. It looks significantly different from the other examples. Is there something different about its conformance?

from amp-by-example.

jkingyens avatar jkingyens commented on June 25, 2024

The cause for me was a typo/bug in my validator task. @Gregable are you trying to validate the html files in "src" directory? These are templates that need to be expanded in order to validate correctly.

from amp-by-example.

Gregable avatar Gregable commented on June 25, 2024

Sorry I must have missed your reply.

The pages themselves contain a rel=canonical link, but the example that is rendered in the page does not. Consider for example:
https://ampbyexample.com/components/amp-access/
This document itself contains:
<link rel="canonical" href="https://ampbyexample.com/components/amp-access/" >

So if I view-source:https://ampbyexample.com/components/amp-access/ and control+f for canonical, I find it.

However the actual example doesn't contain rel=canonical. So, if I'm looking at the rendered example doc, and not the source,and control+f for canonical, I don't find it.

As an example that seems correct, https://ampbyexample.com/introduction/hello_world/ has a canonical:
&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"canonical"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://ampbyexample.com/Introduction/Hello_World"</span>&gt;

Does this make sense?

from amp-by-example.

sebastianbenz avatar sebastianbenz commented on June 25, 2024

Yeah - you're right. The canonical link is automatically generated to make authoring samples easier. We should add it to the code sections as well.

from amp-by-example.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.