Comments (7)
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.
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.
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.
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:
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.
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:
but at least I can have a proper keyword link:
Otherwise it comes out like
![Screenshot 2024-03-21 at 3 27 37 PM](https://private-user-images.githubusercontent.com/3580270/315308147-61779bb1-00a3-4254-a342-17116a284238.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg4NjEyNjQsIm5iZiI6MTcxODg2MDk2NCwicGF0aCI6Ii8zNTgwMjcwLzMxNTMwODE0Ny02MTc3OWJiMS0wMGEzLTQyNTQtYTM0Mi0xNzExNmEyODQyMzgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjBUMDUyMjQ0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NjQ0YjE1MDQyYTdiMTI2NGM4Zjc1ZjY3NzE2Mzg5OTgwMDliYTgxZjA5OWM3MGRiN2NhY2M0ZDRjODRmNDkxYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.9VNOXhWj83rbtagW-Wrg7OKydPihTczEC-Kp_3iAPOU)
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.
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.
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)
- [Feature] Remove Google Fonts HOT 4
- [Bug] ng-doc.routing.ts incorrect generated import HOT 10
- [Bug] input aliasing decorator selector not rendered correctly HOT 4
- [Feature] Support template variables for inputs HOT 11
- [Bug] hidden: true in NgDocPage-Config does not avoid displaying a component in the navigation. HOT 7
- [Bug] Table of contents link does not work properly with basehref HOT 4
- [Bug] Unable to leverage Keywords to create custom links in a reusable macro template HOT 8
- [Feature] Unable to leverage Custom Angular Components in the Markdown file HOT 3
- Support for Mermaid HOT 7
- [Bug] Unable to build docs when Playground refers components from angular library HOT 3
- [Bug] Extra /docs is introduced in the home icon of the breadcrumb during configuration of NgDoc route prefix HOT 4
- [Bug] Unable to display demo details of the components from angular library HOT 3
- [Query] Is it possible to import macros from angular library? HOT 4
- [Bug]Unable to customize the title of the API page HOT 1
- [Bug] The id of the html header is not serialized HOT 2
- Support for native i18n / $localize + localized markdown HOT 3
- [Feature] Demo Pane viewport and theme support
- [Feature] Custom Tabs in Demo HOT 4
- [Feature] Display Component Properties in Component Tabs and on Page
- [Bug] Configure Home icon route path of breadcrumb
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-doc.