docs icon indicating copy to clipboard operation
docs copied to clipboard

Reference HTML IDs in rendered HTML to facilitate referencing|bookmarks

Open DazWilkin opened this issue 3 years ago • 8 comments

Describe the change you'd like to see

The API documentation uses HTML IDs, e.g. RouteStatusFields:

<h3 id="serving.knative.dev/v1.RouteStatusFields">RouteStatusFields</h3>

But the HTML ID is not surfaced in the rendered HTML making it cumbersome to grab the ID (from the source) to use it (as I did above).

Curiously, the Duck Types content does this e.g. Addressable so it may be just config|oversight:

<h3 id="addressable">Addressable<a class="headerlink" href="#addressable" title="Permanent link">¶</a></h3>

Additional context Add any other context or screenshots about the feature request here.

DazWilkin avatar Feb 10 '22 19:02 DazWilkin

The API documentation is auto-generated whereas the duck types page was created manually. This is why the pages are slightly different. This might be an issue/limitation of the auto-generation script.

@csantanapr do you have any insight into whether this can be fixed or improved?

snneji avatar Feb 15 '22 14:02 snneji

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar May 17 '22 01:05 github-actions[bot]

/lifecycle frozen

snneji avatar May 23 '22 12:05 snneji

@psschwei @evankanderson might you be able to help with this one? Otherwise I think we would need to close it, since it's not something myself or Samia can do much about, as we didn't create / don't maintain these scripts.

abrennan89 avatar Jul 27 '22 15:07 abrennan89

I think this is "needs eng implementation" -- I'm not sure if there's a "site improvements" bucket for these to go in.

evankanderson avatar Jul 27 '22 17:07 evankanderson

Added labels for these categories for now

abrennan89 avatar Jul 27 '22 18:07 abrennan89

@abrennan89 Based on a quick look, I don't think the problem is the script. Instead, I think the problem is that the serving/eventing API docs are HTML-encoded. For example, here's a small sample from the serving doc:

<h2 id="autoscaling.internal.knative.dev/v1alpha1">autoscaling.internal.knative.dev/v1alpha1</h2>
<div>
<p>Package v1alpha1 contains the Autoscaling v1alpha1 API types.</p>
</div>
Resource Types:
<ul><li>
<a href="#autoscaling.internal.knative.dev/v1alpha1.PodAutoscaler">PodAutoscaler</a>
</li></ul>

source

I think all we need to do is remove the HTML tags and convert to markdown formatting, and that should solve the issue.

Links: https://github.com/knative/serving/blob/main/docs/serving-api.md?plain=1 https://github.com/knative/eventing/blob/main/docs/eventing-api.md?plain=1

psschwei avatar Aug 02 '22 20:08 psschwei

Alternatively, we could just add the links to the existing documents...

psschwei avatar Aug 02 '22 20:08 psschwei

This issue or pull request is stale because it has been open for 90 days with no activity.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close

/lifecycle stale

knative-prow-robot avatar Nov 09 '22 20:11 knative-prow-robot

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Feb 09 '23 01:02 github-actions[bot]