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

add docs-test #1688

Merged
merged 5 commits into from
Jun 15, 2023
Merged

add docs-test #1688

merged 5 commits into from
Jun 15, 2023

Conversation

Fil
Copy link
Contributor

@Fil Fil commented Jun 12, 2023

from d3/d3#3673

fix a few malformed links; the automatic renumbering of duplicate links with -1 seems fragile, so we make them explicit rather than making the link checker smarter.

from d3/d3#3673

fix a few malformed links; the automatic renumbering of duplicate links with -1 seems fragile, so we make them explicit rather than making the link checker smarter.
@Fil Fil requested a review from mbostock June 12, 2023 11:52
@Fil Fil force-pushed the fil/linkcheck branch from b530493 to e9bb991 Compare June 14, 2023 09:21
@Fil
Copy link
Contributor Author

Fil commented Jun 14, 2023

Not satisfied that I need to check a .js link here, and not in the D3 version.

@mbostock
Copy link
Member

mbostock commented Jun 15, 2023

I removed the exemption for .js files and nothing broke. Are you sure we still need that? What was linking to a .js file?

@mbostock
Copy link
Member

mbostock commented Jun 15, 2023

I think it might be leftover from when you crawled the generated HTML; there is an A tag here for downloading the pre-built UMD bundles:

- <a href="./d3.js" download>d3.js</a>
- <a href="./plot.js" download>plot.js</a>

The new test only looks for Markdown links, so I think we don’t need this exemption anymore. (And I think it’s okay that you can opt-out of link checking by using an A element instead of a Markdown link.)

Copy link
Member

@mbostock mbostock left a comment

Choose a reason for hiding this comment

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

This reminds me that we adopted a more explicit system for naming anchors in the new D3 documentation (e.g., the anchor for Plot.scale would be #scale instead of the default #scale-options or disambiguated #scale-options-1). But I think we could adopt that naming convention in a subsequent PR, and when we do, it’ll be great to have this test in place to make sure we don’t miss anything!

@mbostock
Copy link
Member

Oh, I see now. It’s just crawling the files and breaking on the symlink to dist/plot.umd.js because it hasn’t been built. Yeah. There’s no need to stat .js files. I’ll revert the last commit.

@mbostock mbostock merged commit 3d1c4f3 into main Jun 15, 2023
@mbostock mbostock deleted the fil/linkcheck branch June 15, 2023 20:00
Fil added a commit that referenced this pull request Aug 21, 2023
* add docs-test
from d3/d3#3673

fix a few malformed links; the automatic renumbering of duplicate links with -1 seems fragile, so we make them explicit rather than making the link checker smarter.

* ignore links to plot.js

* apply changes from d3/d3#3673

* ignore .js files (a link to plot.js)

---------

Co-authored-by: Mike Bostock <mbostock@gmail.com>
chaichontat pushed a commit to chaichontat/plot that referenced this pull request Jan 14, 2024
* add docs-test
from d3/d3#3673

fix a few malformed links; the automatic renumbering of duplicate links with -1 seems fragile, so we make them explicit rather than making the link checker smarter.

* ignore links to plot.js

* apply changes from d3/d3#3673

* ignore .js files (a link to plot.js)

---------

Co-authored-by: Mike Bostock <mbostock@gmail.com>
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.

2 participants