-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ZEPPELIN-990] Add header anchor for Zeppelin documentation site #995
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
Conversation
|
Cool! working well. LGTM |
| // Display anchor links when hovering over headers. For documentation of the | ||
| // configuration options, see the AnchorJS documentation. | ||
| anchors.options = { | ||
| placement: 'right' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AhyoungRyu Thanks for the good feature can promote the references! This the feature that I needed :)
But If you don't mind can you consider to change placement to left side instead of right side?
Because considering the user experiences of anchors in other famous open source project documentation:
- most of anchors tend to added at left side of header titles.
- users are tend to start drag or read document from left to right so left anchor have more chance to be discovered fast.
- It seems more clean and neat than right sided anchor.
https://github.com/bryanbraun/anchorjs
http://getbootstrap.com/getting-started/
|
@yoonjs2 Thanks for your suggestion and it makes sense indeed. I changed the placement right -> left as you said :) |
|
@AhyoungRyu Thank you for your consideration! |
|
Thanks @AhyoungRyu for the great improvement. |
| // Scroll now too in case we had opened the page on a hash, but wait a bit because some browsers | ||
| // will try to do *their* initial scroll after running the onReady handler. | ||
| $(window).load(function() { setTimeout(function() { maybeScrollToHash(); }, 25); }); | ||
| $(window).load(function() { setTimeout(function() { maybeScrollToHash(); }, 25); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:O
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@corneadoug I removed it ![]()
|
Merging it into master |
…site ### What is this PR for? Current Zeppelin documentation site is little bit hard to find a way for Zeppelin beginners. It will not easy to improve this at a time, but I did the below as a start of this work. 1. Restructured dropdown menu and added each category names 2. Added a overview list(with short description) to first page of website (index.md) so that people can look through the overall contents in Zeppelin website at a glance. (as [Apache Spark](http://spark.apache.org/docs/latest/#where-to-go-from-here) and [Apache Mesos](http://mesos.apache.org/documentation/latest/) does) Please see the attached screenshot images :) ### What type of PR is it? Improvement & Documentation ### Todos * [x] - Change outdated screenshot images * [x] - Combine `text.md`, `table.md` and `html.md` to `basicdisplaysystem.md` * [x] - Fix dead link in `virtual_machine.md` * [x] - Improve dropdown menu and reorder * [x] - Improve first page(`index.md`) * [x] - Combine with #995 after it is merged into master ### What is the Jira issue? [ZEPPELIN-996](https://issues.apache.org/jira/browse/ZEPPELIN-996) ### How should this be tested? 1. Apply this patch and [build the docs website with jekyll](https://github.com/apache/zeppelin/tree/master/docs#build-documentation) 2. Check the first page(index.html) and dropdown menu ### Screenshots (if appropriate) - Dropdown menu  - First page <img width="717" alt="screen shot 2016-06-14 at 1 28 58 pm" src="https://cloud.githubusercontent.com/assets/10060731/16058631/3ab2cb6c-3234-11e6-95f4-180290df3d02.png"> <img width="694" alt="screen shot 2016-06-14 at 1 29 11 pm" src="https://cloud.githubusercontent.com/assets/10060731/16058639/43d68918-3234-11e6-921c-28436bfca33d.png"> <img width="649" alt="screen shot 2016-06-14 at 1 29 39 pm" src="https://cloud.githubusercontent.com/assets/10060731/16058650/501ec6d6-3234-11e6-9292-53ae84acc18a.png"> <img width="684" alt="screen shot 2016-06-14 at 1 29 57 pm" src="https://cloud.githubusercontent.com/assets/10060731/16058643/4637c8f2-3234-11e6-9b12-a233906f4c8b.png"> <img width="650" alt="screen shot 2016-06-14 at 1 30 12 pm" src="https://cloud.githubusercontent.com/assets/10060731/16058655/56c5af22-3234-11e6-8d29-9b7937728948.png"> <img width="636" alt="screen shot 2016-06-14 at 1 30 22 pm" src="https://cloud.githubusercontent.com/assets/10060731/16058656/58d1187e-3234-11e6-9171-ab7390b4a526.png"> ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: AhyoungRyu <fbdkdud93@hanmail.net> Closes #1004 from AhyoungRyu/ZEPPELIN-996 and squashes the following commits: 1dbf805 [AhyoungRyu] Add 'Apache' before 'Zeppelin' 6153a50 [AhyoungRyu] Remove useless dash 61a5ad6 [AhyoungRyu] Revert to Text -> HTML -> Table in navbar 1886f8c [AhyoungRyu] Fix indentation af70939 [AhyoungRyu] Apply scrollable menu to 'more' tab & fix UI issue 2654d92 [AhyoungRyu] Combine overflow-x & overflow-y to overflow 904acd6 [AhyoungRyu] Resize dropdown menu maxheight 6e62e31 [AhyoungRyu] Change dynamicform image 230c670 [AhyoungRyu] Revert to Text -> HTML -> Table ad53799 [AhyoungRyu] Adjust image size c75c3a0 [AhyoungRyu] Add HDFS logo to available interpreter image 6a2f40b [AhyoungRyu] Address @bzz feedback 649a14d [AhyoungRyu] Address @coureadoug feedback 67cff3a [AhyoungRyu] Add all documentation list with short description to first page ce4b122 [AhyoungRyu] Limit image width 6ff4db6 [AhyoungRyu] Improve dropdown menu and reorder menus 61da430 [AhyoungRyu] Fix dead link in virtual_machine.md 6251558 [AhyoungRyu] Change 'Zeppelin Configuration' section placement so that it can be separated 4eecab8 [AhyoungRyu] Combine text.md, html.md, table.md 4d021af [AhyoungRyu] Delete outdated images and add new images
### What is this PR for? I applied header anchor to Zeppelin's docs website with #995 . It'll be good if `gh-pages` also has this header anchor. ### What type of PR is it? Improvement ### What is the Jira issue? [ZEPPELIN-990](https://issues.apache.org/jira/browse/ZEPPELIN-990) ### How should this be tested? Run this branch locally as described in [here](http://zeppelin.apache.org/contribution/documentation.html) and hover the mouse over any titles. ### Screenshots (if appropriate)  ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: AhyoungRyu <fbdkdud93@hanmail.net> Closes #1418 from AhyoungRyu/gh-page/headerAnchor and squashes the following commits: 54b06f9 [AhyoungRyu] Remove duplicated window.location.hash c27fc99 [AhyoungRyu] Fix scroll position cd41c2f [AhyoungRyu] Add header anchor to gh-pages branch
What is this PR for?
Sometimes we want to share some docs title link as github markdown page does. This PR enables this feature also in Zeppelin documentation site.
What type of PR is it?
Improvement
Todos
anchor.min.jsunderdocs/assets/themes/zeppelin/js/docs.jsWhat is the Jira issue?
ZEPPELIN-990
How should this be tested?
Screenshots (if appropriate)
Questions: