GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tools: build doc/api/all.html by combining generated HTML by rubys · Pull Request #21568 · nodejs/node

Conversation

@rubys

@rubys rubys commented Jun 27, 2018

Copy link
Copy Markdown
Member

Combine the toc and api contents from the generated doc/api/*.html
files. This ensures that the single page version of the documentation
exactly matches the individual pages.

Fixes #20100

This pull request differs from #21544 in that it is implemented using regular expressions and has no dependencies. See #21544 (comment) for more context.

If this pull request is merged, the other will be deleted.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to Node.js builds or CI infrastructure. doc Issues and PRs related to Node.js documentation. tools Issues and PRs related to the tools directory. labels Jun 27, 2018
@rubys rubys changed the title tools: build doc/api/all.html by combining generated HTML #21544 tools: build doc/api/all.html by combining generated HTML Jun 27, 2018
@vsemozhetbyt vsemozhetbyt mentioned this pull request Jun 28, 2018
Produce HTML documentation using unified/remark/rehype #21490
Closed
3 tasks done
@Trott

Trott commented Jun 28, 2018

Copy link
Copy Markdown
Member

@TimothyGu @vsemozhetbyt

vsemozhetbyt reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rubys rubys mentioned this pull request Jun 29, 2018
tools: build doc/api/all.html by combining generated HTML #21544
Closed
3 tasks done
jasnell
jasnell approved these changes Jun 29, 2018
View reviewed changes
@Trott

Trott commented Jun 29, 2018

Copy link
Copy Markdown
Member

@nodejs/documentation It would be a good idea for someone to build all.html with this and compare it to what's in master. The diff should show some broken links being fixed but otherwise there should be no significant changes.

vsemozhetbyt reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rubys
rubys force-pushed the build_api_all_from_generated_html2 branch from 338d466 to 0b9ff5f Compare June 30, 2018 00:36
@rubys

rubys commented Jun 30, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

I've made a few fixes to reduce the differences, rebased to master, and here is a current set of differences: https://gist.github.com/rubys/bae70ed087efec625ac04823aaaf803e

Summary:

  • title is different; instead of picking the first title the new title is the part that is common to all titles. This could be changed, but I would still not recommend that it be the first title.
  • Some whitespace changes - nothing that would affect rendering
  • No include comments; something like that could be added if required, but likely would differ in that it would make more sense to reference the generated html files instead of the md source.
  • An odd change in api stability section; for reasons I don't understand the generation of this section added links previously. Links that are not present on the documentation page. Compare the current node documentation as published publicly: all.html vs documentation.html.
  • The previously generated all.html would sometimes link to definitions within the all.html page, and other times link to definitions on the separate page, and sometimes link to the wrong thing entirely. This has been changed to always link within the same page, and always to exactly what was linked to in the separate pages.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt

vsemozhetbyt commented Jun 30, 2018

Copy link
Copy Markdown
Contributor

The same results here)

An odd change in api stability section...

This is OK. Due to this code:

node/tools/doc/html.js

Lines 209 to 216 in 1bf42f4

// Do not link to the section we are already in.
const noLinking = filename === 'documentation' &&
heading !== null && heading.text === 'Stability Index';
token.text = `<div class="api_stability api_stability_${number}">` +
(noLinking ? '' :
'<a href="documentation.html#documentation_stability_index">') +
`${prefix} ${number}${noLinking ? '' : '</a>'}${explication}</div>`
.replace(/\n/g, ' ');

these links were skipped in documentation.html but wrongly reappeared in all.html. The new result is more consistent, I think.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vsemozhetbyt
vsemozhetbyt approved these changes Jun 30, 2018
View reviewed changes
Comment thread tools/doc/allhtml.js Outdated

@vsemozhetbyt vsemozhetbyt Jun 30, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: extra space before "As".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tools/doc/allhtml.js Outdated

@vsemozhetbyt vsemozhetbyt Jun 30, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean -> Clean ?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tools/doc/allhtml.js Outdated

@vsemozhetbyt vsemozhetbyt Jun 30, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

contenated -> concatenated?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rubys
tools: build doc/api/all.html by combining generated HTML nodejs#21544
6dac7db
Combine the toc and api contents from the generated doc/api/*.html
files. This ensures that the single page version of the documentation
exactly matches the individual pages.

Fixes nodejs#20100
@rubys
rubys force-pushed the build_api_all_from_generated_html2 branch from 0b9ff5f to 6dac7db Compare June 30, 2018 11:14
@rubys

rubys commented Jun 30, 2018

Copy link
Copy Markdown
Member Author

Can somebody spot the CI error for me? I don't see it. I searched for 'error' and 'fail'.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt

vsemozhetbyt commented Jun 30, 2018

Copy link
Copy Markdown
Contributor

You can also search for "not ok" in raw log: https://api.travis-ci.com/v3/job/132202841/log.txt
The test failure seems unrelated:
not ok 2146 es-module/test-esm-loader-invalid-format

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt

vsemozhetbyt commented Jun 30, 2018

Copy link
Copy Markdown
Contributor

Full CI: https://ci.nodejs.org/job/node-test-pull-request/15681/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt

vsemozhetbyt commented Jun 30, 2018

Copy link
Copy Markdown
Contributor

Refs: #21605

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt

vsemozhetbyt commented Jun 30, 2018

Copy link
Copy Markdown
Contributor

#21605 is landed.
New full CI: https://ci.nodejs.org/job/node-test-pull-request/15684/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott

Trott commented Jun 30, 2018

Copy link
Copy Markdown
Member

And again... CI: https://ci.nodejs.org/job/node-test-pull-request/15695/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt

vsemozhetbyt commented Jul 2, 2018

Copy link
Copy Markdown
Contributor

I shall land in some hours if there are no objections.

rubys reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt

vsemozhetbyt commented Jul 2, 2018

Copy link
Copy Markdown
Contributor

Landed in f85962f
Thank you!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt vsemozhetbyt closed this Jul 2, 2018
vsemozhetbyt pushed a commit that referenced this pull request Jul 2, 2018
@rubys @vsemozhetbyt
tools: build all.html by combining generated HTML
f85962f
Combine the toc and api contents from the generated doc/api/*.html
files. This ensures that the single page version of the documentation
exactly matches the individual pages.

PR-URL: #21568
Fixes: #20100
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
@vsemozhetbyt

vsemozhetbyt commented Jul 2, 2018

Copy link
Copy Markdown
Contributor

Maybe we can do the same for the all.json so that we could completely rid of all.md. This can be done by JSON.parse() + combine new object + JSON.stringify() or just manually concatenate the new stringified serialization, not sure what would be easier or more effective. This may be semver-major as it may change the JSON structure users rely on programmatically.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rubys

rubys commented Jul 2, 2018

Copy link
Copy Markdown
Member Author

@vsemozhetbyt in the process, we could also get rid of preprocess.js and therefore processIncludes. Please open an issue and I'll work on a pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt

vsemozhetbyt commented Jul 2, 2018

Copy link
Copy Markdown
Contributor

We usually do not require an issue for a PR. Feel free to pace as you feel comfortable)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott

Trott commented Jul 2, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Awesome to see "Contributor" on @rubys's comments etc. everywhere now. 🎉

vsemozhetbyt reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos pushed a commit that referenced this pull request Jul 3, 2018
@rubys @targos
tools: build all.html by combining generated HTML
5d6d6fb
Combine the toc and api contents from the generated doc/api/*.html
files. This ensures that the single page version of the documentation
exactly matches the individual pages.

PR-URL: #21568
Fixes: #20100
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
@targos targos mentioned this pull request Jul 3, 2018
v10.6.0 proposal #21629
Merged
@rubys rubys mentioned this pull request Jul 3, 2018
tools: build all.json by combining generated JSON #21637
Closed
3 tasks done
@vsemozhetbyt vsemozhetbyt mentioned this pull request Jul 9, 2018
Creating a branch of the Docs using RunKit #21723
Closed
@snyk-bot snyk-bot mentioned this pull request Mar 18, 2020
[Snyk] Upgrade: gatsby, gatsby-image, gatsby-plugin-catch-links, gatsby-plugin-manifest, gatsby-plugin-no-sourcemaps, gatsby-plugin-offline, gatsby-plugin-react-helmet, gatsby-plugin-sharp, gatsby-plugin-styled-components, gatsby-remark-autolink-headers, gatsby-remark-prismjs, gatsby-source-filesystem, gatsby-transformer-remark O330oei/node#3
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
+1 more reviewer
@vsemozhetbyt vsemozhetbyt vsemozhetbyt approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

build Issues and PRs related to Node.js builds or CI infrastructure. doc Issues and PRs related to Node.js documentation. tools Issues and PRs related to the tools directory.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

doc: all.html is seriously broken link-wise

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@rubys @Trott @vsemozhetbyt @jasnell @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.