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

Gitbook rendering updates #159

Merged
merged 3 commits into from
Sep 19, 2018
Merged

Gitbook rendering updates #159

merged 3 commits into from
Sep 19, 2018

Conversation

jacogr
Copy link
Member

@jacogr jacogr commented Sep 19, 2018

Ok, @chevdor is going to kill me...

Now for the long version -

  • Had to move all the docs/.adoc to docs/.md - gitbook does not include linked *.md files when using the adoc plugin, so all links to the api, api-provider, etc. *.md files were broken
  • Even at this point, the nested SUMMARY is an issue, so had to manually add the Api, {Ws,Http}Provider and ApiRx classes to get them to link

What this does not do -

Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

The final result looks good, but it seems obscure to me how you got there. If I delete docs/ and generate build:htmldocs again, only the html folder is generated, not the .md.

The way I would do it:

  1. Typedoc generates .md files from comments, and the .md files are the only things we commit in this repo. This way if people visits the repo, they can hop in the docs/ folder directly.

    • So remove --theme default --out docs/html in package.json
    • Remove all the html files
  2. Let CI do gitbook build, and generate all the html in a separate the folder, zip it and push it to polkadot.js.org.

}
mdEngine: 'gitbook',
stripInternal: 'true',
theme: 'markdown'
Copy link
Contributor

Choose a reason for hiding this comment

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

In package.json, you pass --theme default --out docs/html, which overwrites options here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ahh, package.json is actually not used. (But I didn't want to remove it ... yet, it helps when you can actually test HTML from typedoc as well)

This is a whole sprawling thing, effectively what is actually called is the build-docs script, which is shared - https://github.com/polkadot-js/dev/blob/master/packages/dev/scripts/polkadot-dev-build-docs.sh

(Hence build calling build-ts & build-docs)

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, right, this is the obscure part I missed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Obscure is the right word, yes.

@jacogr
Copy link
Member Author

jacogr commented Sep 19, 2018

That would be the idea, however since polkadot.js.org already has a site, not as easy. The best we can do is to use the GH repo /docs sharing atm :( (And even for that, have issues with e.g. /apps since that is already hosted on gh-pages)

I certainly want to move to e.g. a docs repo with all the stuff included, initially trying to get at least some basic content up around the API.

so yes, 100% right - lots of work remaining :(

@jacogr jacogr merged commit 4854379 into master Sep 19, 2018
@jacogr jacogr deleted the jg-gitbook branch September 19, 2018 14:14
@polkadot-js-bot
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Jun 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gitbook does not render nested md files
3 participants