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

Bad link and bad code on https://os.mbed.com/docs/mbed-os/v6.15/apis/platform-concepts.html #1492

Open
supcik opened this issue Dec 6, 2021 · 2 comments

Comments

@supcik
Copy link

supcik commented Dec 6, 2021

Docs issue template

Page link

https://os.mbed.com/docs/mbed-os/v6.15/apis/platform-concepts.html

Expected to find...

On this page, there is a link "Importance of State" pointing to a wrong page ("platform.html#the-importance-of-state" instead of "platform-concepts.html#the-importance-of-state"

In the main.cpp code (https://github.com/ARMmbed/mbed-os-snippet-PlatfromOverview_Callbacks/blob/v6.15/main.cpp), the echo function reads and writes a char, but the size argument (sizeof(c)) returns the size of the pointer (4 on a 32 bit system) instead of 1.

Found

  • Link to wrong page
  • Error in code

Remark

I tried to find the corresponding pages in github, but I don't understand how URL are mapped to markdown documents.

For example :

  • The page with the title "Platform overview" is at the URL ".../apis/platform-concepts.html" and the markdown file seems to be "docs/api/platform/platform.md"
  • The page with the title "Platform APIs" is at the URL ".../apis/platform.html" and the markdown seems to be "docs/api/platform/platform_list.md"

Can you please explain the rules between the title, the URL and the ".md" file?

Thank you very much in advance.

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 10, 2022

To the remark:

The tree structure is defined https://github.com/ARMmbed/mbed-os-5-docs/blob/development/docs.json where you can find .md files (this is my understanding. Most of the time I check here or just search for the section in the docs folder and edit the markdown file).

I assume docs/api/platform/platform.md needs fixing - the url update, is that it?

@ChrisGooch-Arm
Copy link
Collaborator

I have fixed the broken link and created a PR - #1497. Thanks for spotting.

The URL structure of the docs project is driven by the docs.json file as mentioned above, and unfortunately that has led to some differences between the filenames/structure of the project source and the website URLs / structure which may not always be obvious without reference to the json file.

In terms of the code example fix - presumably the code should be using strlen(), not sizeof()?

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

No branches or pull requests

3 participants