lf-lang / lf-lang.github.io

The Lingua Franca website
https://www.lf-lang.org/
BSD 3-Clause "New" or "Revised" License
7 stars 18 forks source link

Ensure that all section headers are generic and not target specific #238

Open erlingrj opened 8 months ago

erlingrj commented 8 months ago

For instance under the Tracing page: image

The sections "Tracing in C++" and "Usage" does not exist for the C target. Clicking those links will not make anything happen. It makes it hard to get an overview for articles with multiple target languages.

axmmisaka commented 6 months ago

I believe this would require us to contribute upstream - https://github.com/facebook/docusaurus/issues/6201#issuecomment-2104291113

slorber commented 6 months ago

For reference, here's the page link: https://www.lf-lang.org/docs/reference/tracing/

What I understand is that you want to put headings inside tabs, and expect the TOC items to self-update on tab change.

This is discussed in another issue and would be quite complex to build correctly: https://github.com/facebook/docusaurus/issues/5343

lhstrh commented 6 months ago

@slorber: thanks for taking a look at this. Yes, what you're describing is the feature we'd like to have. Lingua Franca has different targets, and there is no full feature parity between targets, so there are some headings that exist under one tab, it might not exist under another.

@erlingrj: since self-updating toc items are currently not supported, a near term fix would be to structure the content under the different tabs such that the headers are generic (i.e., have a header called "Enabling Tracing" and have target-specific instructions under it). For the time being, if a feature isn't supported, we could just have a "Not supported" message in the content. TL;DR: We shouldn't have target-specific headers like "Tracing in C++" and "Tracing in C and Python" if we are already using tabs.