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

plain.html is not consistent with deployed index.html #11396

Open
3 tasks done
Josh-Cena opened this issue Jul 1, 2024 · 6 comments
Open
3 tasks done

plain.html is not consistent with deployed index.html #11396

Josh-Cena opened this issue Jul 1, 2024 · 6 comments
Labels
awaiting response Awaiting for author to address review/feedback idle

Comments

@Josh-Cena
Copy link
Member

Josh-Cena commented Jul 1, 2024

Summary

The output plain.html is not consistent with index.html, in particular the anchors are different.

URL

https://developer.mozilla.org/en-US/docs/Web/CSS/Value_definition_syntax#question_mark

Reproduction steps

  1. Run yarn build files/en-us/web/css/value_definition_syntax/index.md --nohtml
  2. Check build/en-us/docs/web/css/value_definition_syntax/plain.html; search for "question_mark"
  3. See <h3 id="question_mark_">

Expected behavior

The anchor is question_mark, because that's what the deployed page has (and what yarn start displays)

Actual behavior

The anchor is question_mark_

Device

Desktop

Browser

Chrome

Browser version

Stable

Operating system

Mac OS

Screenshot

No response

Anything else?

Apologies in advance if this is something that's changed very recently. My Yari version is the latest.

Validations

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jul 1, 2024
@caugner
Copy link
Contributor

caugner commented Jul 1, 2024

We don't make any guarantees about the contents of those plain.html files, as these are only used internally for our AI Help index. We really shouldn't write them as part of a regular yarn build run.

@Josh-Cena
Copy link
Member Author

Since generating index.html is deprecated, what do we use to get the output HTML, then?

@caugner
Copy link
Contributor

caugner commented Jul 1, 2024

Rendering index.html as part of the build is deprecated, because it has been split to a separate yarn render:html command. Let me know if that helps.

@Josh-Cena
Copy link
Member Author

Could you add that to content's scripts? I'm not sure if this is distributed in the Yari CLI.

Also, the index.html is much bigger than plain.html and hard to parse. Having a stable plain.html is still much appreciated, but it's fine if you want to treat that as an implementation detail.

@mdn mdn deleted a comment from shreewiser Jul 23, 2024
@LeoMcA
Copy link
Member

LeoMcA commented Jul 23, 2024

I'm intrigued that the plain.html files don't have the same ids as index.html, we should probably fix that in its own right for AI Help.

Otherwise, @Josh-Cena can you help me understand your workflow here? Why are you building and manually parsing the HTML files, rather than running yarn start and viewing the output live-built in your browser? What's the sequence of commands + actions you're (ideally) running?

@LeoMcA LeoMcA added awaiting response Awaiting for author to address review/feedback and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jul 23, 2024
@Josh-Cena
Copy link
Member Author

@LeoMcA: I'm parsing plain.html as part of my link checker that detects broken anchor links. I run it on build output so it can handle links generated by macros.

This bug doesn't block me now because I have since switched to parse index.json instead, but I think this is still nice-to-have for Yari.

@github-actions github-actions bot added the idle label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response Awaiting for author to address review/feedback idle
Projects
None yet
Development

No branches or pull requests

3 participants