-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow local configuration for cdn assets #4
Comments
Can you tell me more about your use case? Would it be enough to provide a way to override the path so that you can define where to look for the icons? Something like this: const default path = `https://cdn.jsdelivr.net/npm/material-icon-theme@4.32.0/icons`
const url = (getPathFromConfiguration() || default_path) + `/${icon}` Is that enough? I also was thinking about retrieving all used icons into a local folder and then to point to the local folder in a relative way. |
I'm using Antora. Yes -- if I could configure a path, that would be great. Ideally, it would be something that could be set in any runtime, but my priority is Antora. |
I wonder if it's possible to also add these icons to the Antora UI Bundle? I'd be willing to throw these in there, but I'd still need a way to specify an alternate path. |
About Antora I was thinking about directly adding the icons into the UI catalog so that the build process is putting then into the right folders. I will take a look into this how easy this could be implemented or if there could be also an intermediate solution. A dynamic and a configurable static approach. |
That would be terrific, thank you! |
Bigger refactoring: Now generates a treeview.css instead of creating image tags Uses roles on an tag to define the icons. Supports antora, embedded, jsdelivr and custom url Closes #4
Bigger refactoring: Now generates a treeview.css instead of creating image tags Uses roles on an tag to define the icons. Supports antora, embedded, jsdelivr and custom url Closes #4
So I implemented multiple improvements:
|
@DryHumorInDC is this working for you? |
So sorry, I just saw this. Unfortunately, I am not only without Internet connectivity at runtime, but also at build-time. Therefore, I shall try moving the assets and utilizing the :treeview-icon-source property. I should have time to do this by Friday, and I'll let you know. The approach seems quite doable, so thank you in advance! |
@DryHumorInDC I do not think that you need to move the assets on your own. As long as you
use Antora and have the needed dependencies in the local node_modules the
icons are copied from the local material-icons-theme module to the Antora
_/img/treeview folder and not downloaded from the internet. IMHO is should fit your use case quite well.
|
Ah, gotcha. I just need to wait a few more days on this. My administrators promise to have your npm module pulled in by Friday. Will tag up then. Thanks for your patience. And my have you been busy! I just looked at what you had to do to make this happen; I'm grateful. :-) |
Success! Thank you so much. I'm very grateful to you. I'm using the antora method, but also tested embedded with equal success. |
That is great. Thx for using it and asking for new features to make it even better. Have fun with the extension. |
One of my environments is offline/air-gapped, and this environment does not jive well with this extension. Can you find a way to specify a local location in lieu of fetching over the network? It looks like that resource is hard-coded in ./lib/converter/treeline-to-html-converter.sh
I can install the material-icon-theme npm module by bringing that resource over manually, but I need a way to point at that local resource.
The text was updated successfully, but these errors were encountered: