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

"cdk docs" opens on "index" and it's not very useful #129

Closed
eladb opened this issue Jun 19, 2018 · 6 comments · Fixed by #245
Closed

"cdk docs" opens on "index" and it's not very useful #129

eladb opened this issue Jun 19, 2018 · 6 comments · Fixed by #245
Assignees

Comments

@eladb
Copy link
Contributor

eladb commented Jun 19, 2018

cdk docs should open on "welcome.html" instead of "index.html"

Also, it would be nice to be able to do "cdk docs getting-started" and it will open on "getting-started.html".

@eladb eladb changed the title "cdk docs" should open on "welcome" instead of "index" "cdk docs" opens on "index" and it's not very useful Jun 19, 2018
@eladb
Copy link
Contributor Author

eladb commented Jun 19, 2018

@Doug-AWS, @RomainMuller and I are thinking that perhaps the right solution to this is to simply rename welcome.rst to index.rst (and either delete index.rst altogether or rename it to toc.rst or something like that if we still think it's useful. Thoughts?

@Doug-AWS
Copy link
Contributor

Hmm. Every AWS SDK (and every Sphinx project I've seen) uses this structure. I'll investigate.

@Doug-AWS
Copy link
Contributor

The real issue is that index.html contains an exploded table of contents, where every single topic page is listed. It wouldn't be so bad if it had just the 10 entries I have in index.rst:

.. toctree::
Welcome
Getting Started
Developing Apps
Developing Libraries
Examples
Concepts
Tools
Advanced Topics
Glossary
Reference

@eladb
Copy link
Contributor Author

eladb commented Jun 20, 2018

I agree that this is /also/ an issue, but the experience we want is that when people open the root directory of the docs in their browser (open ~/.cdk/docs), they will see the welcome page and not this index.

What happens if we rename index.rst to toc.rst and welcome.rst to index.rst?

@eladb
Copy link
Contributor Author

eladb commented Jun 20, 2018

@Doug-AWS if it makes more sense from your end to leave index as is, we can simply route cdk docs to open welcome by default. If you are good either way, I rather we change index to be the page we want users to see first, which is a web standard.

@Doug-AWS
Copy link
Contributor

Doug-AWS commented Jun 21, 2018

Not sure. The brazil build produces this experience. The index.html that brazil produces re-routes as you suggest in the HEAD section:

  <script type="text/javascript">
     <!--
    var myDefaultPage = "welcome.html";
       	var myPage = document.location.search.substr(1);
       	var myHash = document.location.hash;
    
          if (myPage == null || myPage.length == 0) {
             myPage = myDefaultPage;
          } else {
             var docfile = myPage.match(/[^=\;\/?:\s]+\.html/);
             if (docfile == null) {
   				myPage = myDefaultPage;
	     		 } else {
                myPage = docfile + myHash;
             }
          }
          self.location.replace(myPage);
--></script>

eladb pushed a commit that referenced this issue Jul 8, 2018
Add getting started and welcome in Java (and JavaScript).

Rewrite "Getting Started" to detail the process of defining CDK apps
without using `cdk init`. This is in order to improve the understanding
of users when they onboard the CDK, which fixes #219.

Fix TOC to include only two layers deep which fixes #129.
@eladb eladb closed this as completed in #245 Jul 9, 2018
eladb pushed a commit that referenced this issue Jul 9, 2018
Add getting started and welcome in Java (and JavaScript).

* Rewrite "Getting Started" to detail the process of defining CDK apps
without using `cdk init`. This is in order to improve the understanding
of users when they onboard the CDK, which fixes #219.
* Fix TOC to include only two layers deep which fixes #129.
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 a pull request may close this issue.

3 participants