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

Update console.md #51

Closed
wants to merge 1 commit into from
Closed

Update console.md #51

wants to merge 1 commit into from

Conversation

sfdeloach
Copy link
Contributor

This is my first ever contribution to open source! I apologize in advance if I am breaking protocol! I wanted to see if this file meets the open issue to make these pages look more like the website. Please let me know if this is what you are looking for and I take a shot at the rest of the files in the doc folder.

Relative links were used in the update. Extra header row added since GitHub tables require it.

Relative links were used in the update. Extra header row added since GitHub tables require it.
@joaodasilva joaodasilva linked an issue Jan 14, 2022 that may be closed by this pull request
@joaodasilva
Copy link
Contributor

joaodasilva commented Jan 14, 2022

Thanks for giving this a try! I think this is meant to address issue #3.

The problem is a bit more complicated. The markdown files are used in two ways:

  1. they can be visited directly on GitHub, which renders the Markdown as HTML
  2. they can also be used by Jekyll to create the HTML pages of the main site

This PR fixes (1), but breaks (2).

The difficulty is that (2) requires Jekyll, because that's what GitHub Pages uses (the site at windowjs.org is really just a custom domain for GitHub Pages built out of the docs/ directory). See the documentation here:

https://windowjs.org/dev/documentation
https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll

I didn't really know anything about GitHub Pages nor Jekyll when I built that, so it kinda works but unfortunately it doesn't render well on the main GitHub view. That's the main problem to be fixed: make the pages also render "ok" on GitHub (problem (1) above).

They don't look too bad, but it's not good either:

https://github.com/windowjs/windowjs/blob/main/docs/doc/console.md

The main issues are:

  • the Jekyll frontmatter appearing as tables on top
  • tables not rendering correctly
  • {% includes %} not working at all.

I don't really know what's the right way to fix these, so I've filed the issue and maybe someone with more experience with GitHub Pages could have a look into this.

The attempt at a fix is very appreciated. Please feel free to continue contributing to the project! Consider posting your plans in the issues or in the discussions so that you can get the background context and confirm that the approach might work.

If you'd like to improve the documentation:

  • there's issue Improve the documentation pages on mobile devices #33 about rendering the HTML better on mobile devices. You'll have to serve the pages using Jekyll on your computer first, and then use the Chrome Devtools to see how they look on mobile. Jekyll will then update the pages automatically when you make changes. The Canvas API docs look really bad on my phone: https://windowjs.org/doc/canvas. The fix should involve editing only docs/style.css, but it's a bit of a mess :-)

  • I'm not a native English speaker and I bet the docs have a lot of funny grammar and phrases. I've tried to write them in a clear way, in mostly impersonal language that focuses on the tools and the APIs. I'd appreciate it a lot if native speakers fix whatever they find that is off :-)

  • @hamish-milne just introduced Typescript types and we'd like to eventually generate the Markdown documentation out of those, to keep them in sync.

@sfdeloach
Copy link
Contributor Author

Thank you very much for the thorough and helpful response. And yes, this was meant for #3. I am sorry for being such a newbie!

After spending some time reading up on Jekyll and looking at other sites, this does appear to be a challenge above my abilities. I will try to help on #33.

@sfdeloach
Copy link
Contributor Author

I am respectfully withdrawing my pull request on issue #3 at this time.

@sfdeloach sfdeloach closed this Jan 16, 2022
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.

Fix the documentation on the github repository
2 participants