Skip to content

Docs: Better manual navigation #496

Closed

Description

@mdre

Could be changed the title with the section first so it more easy to find it in the multiple tabs open.

Screenshot_20220829_113702

Activity

  1. lvca commented on Aug 30, 2022

    @lvca
    Member

    What's the URL of that page?

  2. self-assigned this
    on Aug 30, 2022
  3. added
    documentation
    on Aug 30, 2022
  4. mdre commented on Aug 30, 2022

    @mdre
    Author

    it is the same URL, just different section. For example:
    https://docs.arcadedb.com/#SQL-Create-Vertex --> title: AcadeDB Manual ---> suggestion: Create Vertex - ArcadeDB Manual
    https://docs.arcadedb.com/#SQL-Update --> title: AcadeDB Manual ---> suggestion: SQL Update - ArcadeDB Manual
    https://docs.arcadedb.com/#SQL-Alter-Type --> title: AcadeDB Manual ---> suggestion: SQL Alter - ArcadeDB Manual

    I usually open and keep a section open for fast reference. The title fine but if it include the section that is showing could be better. It just a suggestion.
    When I'am studding something I open a lot of pages and keep ir open and sorted. The Tree Style Tab is my best friend to do this!

  5. lvca commented on Aug 31, 2022

    @lvca
    Member

    I got it now. We use AsciiDoc, not sure if changing the title is possible. But I agree it would be nice.

  6. gramian commented on Nov 16, 2022

    @gramian
    Collaborator

    Dear @mdre ,
    I second @lvca on this, the bookmark's title is likely suggested from the <title> tag in the HTML head(er) block of a page, so each bookmark of any anchor produces the same bookmark title. So, this could be more of a missing browser feature?

  7. mdre commented on Nov 17, 2022

    @mdre
    Author

    Hi guys!

    I had never used AsciiDoc but a fast reading take me to passthrough. What I found is that if you include this block in the head it make what I want:

    ++++
    <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
    <script>
        $(document).ready(function () {
           $('a').click(function(e) {
              $('title').text(e.target.text + " - ArcadeDB Manual");
              history.pushState({}, '', $(this).attr('href'));
              
          });
        });
    </script>
    ++++
    

    I do not have the doc to test but here is the result of adding that script to the html head section: adb.zip

  8. added a commit that references this issue on Nov 17, 2022
  9. lvca commented on Nov 17, 2022

    @lvca
    Member

    @mdre just deployed your fix and works. Thanks!

  10. added this to the 22.11.1 milestone on Nov 17, 2022
  11. changed the title [-]betther manual navigation. [/-] [+]Docs: Better manual navigation[/+] on Dec 7, 2022
  12. mdre commented on Apr 8, 2023

    @mdre
    Author

    Hi!
    It's seem that this enhanced has been lost in current manual. Could be it activated again?
    Thanks

  13. lvca commented on Apr 10, 2023

    @lvca
    Member
  14. gramian commented on Apr 10, 2023

    @gramian
    Collaborator

    It still works for me, maybe a hard refresh is needed because of doc updates?

  15. mdre commented on Apr 10, 2023

    @mdre
    Author

    Hi!.
    I found what was bothering me. If you keep the browser with the tabs open it loose every title in next reload. The same happend if you ctrl+click to open the link in a new tab.
    To fix it the script must be changed to:

     $(document).ready(function () {
           $('a').click(function(e) {
              $('title').text(e.target.text + " - ArcadeDB Manual");
              history.pushState({}, '', $(this).attr('href'));
          });
          
          var hash = window.location.hash;
    
          if (hash) {
                  hash = hash.substr(1); // Quita el carácter "#" del hash
                  $("a[href$='" + hash + "']").each(function() {
                          var title = this.text;
                          
                          let isSection = /^\d/.test(title);
                          if (isSection) {
                            $('title').text(title + " - ArcadeDB Manual");
                          }
                  });
          } 
          
        });
  16. added a commit that references this issue on Apr 10, 2023
  17. lvca commented on Apr 10, 2023

    @lvca
    Member

    Trying this out, just pushed, in 10 mins should be online.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentation

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions