ampproject / amp.dev

The AMP Project Website.
https://amp.dev
Other
582 stars 694 forks source link

Jekyll error occurs while generating amp-access-spec documentation #21

Closed britice closed 8 years ago

britice commented 8 years ago

After importing reference docs with import_reference_docs.js, the following error occurs when running jekyll serve:

Configuration file: /<private>/docs/_config.yml
            Source: /<private>/docs
       Destination: /<private>/docs/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
  Liquid Exception: Syntax Error in tag 'highlight' while parsing the following markup: amp-mustache``` 
  Valid syntax: highlight <lang> [linenos] in /<private>/docs/_reference/extended/amp-access-spec.md
britice commented 8 years ago

It appears that amp-access-spec.md is not formatted in a way that is correctly parseable by the convertMarkdown function of import_reference_docs.js.

The current build of the amp-access-spec page of the docs website also appears to have been incorrectly converted but it must have been built without errors.

Here is a screen-shot sample from the page which appears to have been incorrectly converted to html: amp-access-spec

Notice that the list is not correctly formatted and the code formatting seems to set on the wrong content.

britice commented 8 years ago

@dvoytenko, it looks like you're the only one who has commits which affect the markdown file mentioned in this issue. I haven't dug into what's causing the formatting issue but it looks like things aren't appearing correctly on the docs site.

dvoytenko commented 8 years ago

@andreban Any idea?

andreban commented 8 years ago

What is breaking it is actually the import_reference_docs.js script. I did 2 things: 1 - Updated the docs with a workaround (added a comma to EOL), to avoid the amp-mustachebeing treate as highlighted code and fixed some H2 (##) issues. 2 - Created a fix for the script that improves the regexp when handling highlights.

dvoytenko commented 8 years ago

It's merged. PTAL.

pbakaus commented 8 years ago

As all fixes are merged, I'm closing this. Please let me know if you still have issues.