Comments (5)
This is not supported at the moment, and I am not yet sure if it will be. It is quite easy to add, but the main problem lies in the intersection of the Nunjucks and Angular APIs, which in theory can also be fixed. However, I am concerned about the numerous edge cases that may arise when implementing Angular components in this way, which I am unaware of. I am still thinking about this feature, and I might try to release it as an experimental feature for the builder.
In any case, I have added support for PageProcessor, which allows you to replace HTML elements with Angular components. Here are examples of internal page processors
@skoropadas The page processor approach can work so long as you don't need additional properties from the markdown. Could you expose a way for us to tap into the markdown-to-html
process in the builder? There are use cases for extending this.
Here's an example use case:
My design system has a specific component for the inline-alert. In my React + MDX library, I've built a Vite plugin that parses the content with remark to add support for additional nodes.
One thing we support is github's beta alert system:
> [!note/Custom Title]
> Neat, a custom title
I've tried overriding the ng-doc blockquote page processor, but there is no way for me to supply a custom title. I would need to tap into the markdown-to-html process in the builder to add support for an attribute like this.
As an aside, I'm very impressed with what you've done with this builder. It was a huge undertaking and it works beautifully.
from ng-doc.
@R-Bower Thank you very much! You are one of the longest-standing users, so your feedback is very important to me! ❤️
In fact, I am seriously trying to add support for using Angular components within Markdown. I think you know that currently, ng-doc simply renders markdown and then inserts it into the page using innerHTML
. This generally works, but it makes it impossible to use Angular components directly, which is why I added Page Processors.
However, the problem is that Page Processors cause issues with SSR, as Angular does not support hydration for such dynamic content. Therefore, I would like to add support for Angular components in markdown in version 18 and deprecate Page Processors.
Regarding customization within markdown-to-html, I think I will migrate this function to the remark library and add the ability to pass custom plugins to it. But this will not happen before the release of version 18. The support for multiple markdown files for one page discussed in #24 forced a significant overhaul of the builder, which is actually for the better since it should become more stable.
In any case, I would ask you to create a ticket for plugin support for transforming markdown to HTML so that I can prioritize it and start working on it in the future.
from ng-doc.
This is not supported at the moment, and I am not yet sure if it will be. It is quite easy to add, but the main problem lies in the intersection of the Nunjucks and Angular APIs, which in theory can also be fixed. However, I am concerned about the numerous edge cases that may arise when implementing Angular components in this way, which I am unaware of. I am still thinking about this feature, and I might try to release it as an experimental feature for the builder.
In any case, I have added support for PageProcessor, which allows you to replace HTML elements with Angular components. Here are examples of internal page processors
from ng-doc.
This is not supported at the moment, and I am not yet sure if it will be. It is quite easy to add, but the main problem lies in the intersection of the Nunjucks and Angular APIs, which in theory can also be fixed. However, I am concerned about the numerous edge cases that may arise when implementing Angular components in this way, which I am unaware of. I am still thinking about this feature, and I might try to release it as an experimental feature for the builder.
In any case, I have added support for PageProcessor, which allows you to replace HTML elements with Angular components. Here are examples of internal page processors
Noted, thank you so much :). Ng Doc is awesome :). I will keep an eye on the future release and this thread to see when this feature will be available in the coming months :)
from ng-doc.
@akhileshThapliyal Thank you! Let's keep this ticket to track the status
from ng-doc.
Related Issues (20)
- [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
- 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 5
- [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 6
- [Feature] Demo Pane viewport and theme support
- [Feature] Custom Tabs in Demo HOT 5
- [Feature] Display Component Properties in Component Tabs and on Page HOT 1
- [Bug] Configure Home icon route path of breadcrumb
- Add plugin for customizing the transformation of markdown to HTML
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.