Giter Club home page Giter Club logo

Comments (4)

amandastevens avatar amandastevens commented on August 18, 2024

@NateWr, I love the new split navigation menu for the table of contents in the Docs Hub, but it would be even better if the current chapter or section that the user is in could be highlighted. This would make it a lot easier for the user to remember which chapter or section they're in and to navigate to another chapter or section. Would it be hard to implement this?

from pkp-docs.

NateWr avatar NateWr commented on August 18, 2024

Mmm, yes a bit more tricky because we are storing the table of contents as markdown instead of structured data (like the yaml files where cards are defined).

This has been the source of some of the other challenges we have (ie - next/previous pages or links to this page in another language). We inherited this structure from the original conversion over from gitbooks. To resolve this and related issues, we'd need to convert every SUMMARY.md file:

* [Preface](.)
* [Introduction](./introduction.md)
  * [Background](./introduction.md#background)
  * [OJS Features](./introduction.md#ojs-features)
...

To something like:

toc:
  - name: "Preface"
    path: "."
  - name: Introduction
    path: "./introduction.md"
    sections:
    - name: "Background"
      path: "./introduction.md#background"
    - name: "OJS Features"
      path: "./introduction.md#ojs-features"

I might be able to write an automated conversion tool, but we may need the docs team to do the conversion manually. We may also need to move these files out of their respective categories and into the _data directory, which might be a little more complicated for the docs team to manage.

If it sounds like grunt work the docs team would be willing to do, I can try to set aside a little bit of time in the next few weeks for a quick experiment to see if we can implement some of these features fairly easily...

from pkp-docs.

kaitlinnewson avatar kaitlinnewson commented on August 18, 2024

One concern I have with moving things into the _data directory is how it would impact translations. Currently the translators are translating the contents of the guide directory in GitLocalize, but moving it out of that directory and into _data would add some complexity to this since the file would no longer appear in GitLocalize. We would then have to do a more manual request to get the translation of the TOC, or create it ourselves based on their translation work.

from pkp-docs.

NateWr avatar NateWr commented on August 18, 2024

Yeah that would be a significant downside. I did a quick search but didn't find anything suggesting we could access data files outside of the _data directory.

from pkp-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.