Giter Club home page Giter Club logo

Comments (7)

skoropadas avatar skoropadas commented on June 20, 2024 2

Thank you for the example.

I think the most suitable option would be to add index.md to the category configuration.

I wasn't really sure about this feature because:

  • For example, if you automatically render a list of child pages for each category, as some docs do, it creates the impression that it's a page just for the sake of having a page, because it's still faster to find the necessary page in the navigation panel than on such a page.
  • Using introductions like the one you provided makes more sense. There might be an issue with understanding when a category is a page and when it's just an expander in the side menu for the user, because in fact, the only difference between them is a slight design difference. But I think it will be the responsibility of whoever creates the documentation rather than the library.

In any case, I will deal with this later because right now the ticket #24 is my priority. I need to finish it, and after the major release (I guess), I'll be able - to work on this feature.

from ng-doc.

skoropadas avatar skoropadas commented on June 20, 2024 1

Hi @skoropadas,

Any idea when this feature would be available or is there any workaround to show the contents when a user selects the category?

Regards,
Akhilesh

I have no estimated date, I'm gonna start thinking about this only after the NgDoc 18 release, there are many things that I need to think about. This feature literally means that we don't need ng-doc.category.ts files anymore because they are gonna have absolutely the same functionality as common pages.

from ng-doc.

skoropadas avatar skoropadas commented on June 20, 2024

Hi, thank you for the ticket! Yes, you're right, it's not possible at the moment. When designing the library, I questioned whether this functionality was needed, but couldn't find good use cases, so I decided not to overcomplicate it. Similar pages often display a list of child pages, sometimes with icons added to them. I think this functionality would require good customization. Do you have any good examples of using such a feature that I could look into?

from ng-doc.

parliament718 avatar parliament718 commented on June 20, 2024

thanks for the quick reply. A large portion of docs I've seen have this feature. See here, here, here, etc.

The other kinda annoying part about not having this is that we are forced to skip the category in the footer navigation:

Screenshot 2024-03-21 at 9 44 55 AM

Above you go from the "Introduction" page to the "Introduction" page of the next category. If this feature existed I could remove the nested Introduction page and have the introduction text on the category itself. This would also have the effect of fixing the footer navigation. Would go from "Introduction" to "Automation Platform".

Thanks for considering this.

from ng-doc.

parliament718 avatar parliament718 commented on June 20, 2024

Thanks again!

Just want to add that this would probably require implementing keyword option for categories as well.

An issue I'm having with the current state is that if I want to link to the "Overview" page of a category (while categories lack an md file), I have to name both the Category and Page the same, which comes out looking bad in the menu:

Screenshot 2024-03-21 at 3 25 38 PM

but at least I can have a proper keyword link:
Screenshot 2024-03-21 at 3 26 47 PM

Otherwise it comes out like

Screenshot 2024-03-21 at 3 27 37 PM

It seems that keywords use the page title instead of the keyword itself, so that's another issue I'm having that would be solved by having categories have both mdFile and keyword.

Thanks

from ng-doc.

skoropadas avatar skoropadas commented on June 20, 2024

Got it, there will be a workaround in the new version to do what you want, because keywords definition will be moved to the markdown file and you also will be able to specify an additional title using yaml front matter syntax (for tabs).

But even if you don't have tabs, the keywords will try to use the title from markdown first and only if it doesn't exist use the title from the page configuration.

So in your case for the index.md of your category you will have something like this:

---
title: Overview
keyword: YourKeyword
---

The content

Anyways will see, because something can always change.

from ng-doc.

akhileshThapliyal avatar akhileshThapliyal commented on June 20, 2024

Hi @skoropadas,

Any idea when this feature would be available or is there any workaround to show the contents when a user selects the category?

Regards,
Akhilesh

from ng-doc.

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.