Comments (13)
Hi @jrkt, I've reached out to the TechDocs team to see if they have any ideas.
from backstage.
exact same problem here
from backstage.
Hi @jrkt, TechDocs uses the DOMPurify library to sanitize HTML and prevent XSS attacks. Pretty sure this is what you are running in to.
from backstage.
@awanlin that makes sense for the javascript library, but not for the "pre" elements with mermaid classes. Why would it sanitize native <pre>
tags? It's also writing it as if no language is specified. DOMPurify strips out "dangerous" HTML which makes me think it would simply just remove things that are present if they are deemed "dangerous". But, it's not stripping anything out. It's simply rendering it as if it doesn't know how to evaluate the mermaid language specified in the code fences.
from backstage.
You are right, this doesn't even come into play until you run TechDocs:
You are seeing this issue before that based on your description.
from backstage.
Correct. The generated site that we publish to a GCS bucket does not have any of the mermaid classes rendered. It's like it is ignoring that plugin. I also tried the mkdocs-export-mermaid-to-svg and had the same result.
from backstage.
Could something in techdocs-core
MkDocs plugin play into this? https://github.com/backstage/mkdocs-techdocs-core
from backstage.
@awanlin what do you mean?
from backstage.
Unless you are using the --omitTechdocsCoreMkdocsPlugin
flag the techdocs-core
plugin gets added to the mkdocs.yml
. Your comment - "It's like it is ignoring that plugin" - made me think maybe it's doing something odd. It does contain a bunch of other MkDocs plugins itself.
from backstage.
Adding that flag got me what I wanted generated for the site. The only problem now is that turning off the core plugin, now the techdocs content page just loads forever. Have there been any reported issues with that flag?
from backstage.
So the techdocs-core
plugin is not optional, you need it for TechDocs to work. The docs for sure don't make that as clear as they could, or really at all. As far as that flag goes, I'll be honest, it's sort of contradictory to that fact. Essentially the flag assumes that you have the techdocs-core
plugin in your config and won't add it.
BUT this at least tells us that the issue is with something in the techdocs-core
plugin. Now what that might be I'm less helpful around as I've never dove into that side of things. I've been lucky enough that it just worked for me needs in the past.
from backstage.
Who would be a better person to bring into the conversation that is knowledgeable about the techdocs-core
plugin? It just seems like it's ignoring any plugins provided in mkdocs.yml
from backstage.
when I use kroki plugin it works like said in the backstage doc, but not with mermaid2 plugin
from backstage.
Related Issues (20)
- 🐛 Bug Report: BitbucketCloudClient returning status 400 Bad Request HOT 2
- 🐛 Bug Report: github authenticator signin does not reflect in 'backstage-plugin-github-pull-requests' HOT 1
- 🐛 Bug Report: GET locations by entity API call does not work HOT 2
- 🐛 Bug Report: Scaffolding - empty item in selectbox for enum is not visible
- 🐛 Bug Report: No matching host for Bitbucket Server HOT 1
- 🐛 Bug Report: Missing React dependencies HOT 1
- 🐛 Bug Report: TypeError: Cannot read properties of undefined (reading 'createServer') HOT 5
- 🚀 Feature: Custom Grid on Catalog Entity Page HOT 1
- 🐛 Bug Report: Github Org Data does not have option to import github team under default namespace HOT 2
- 🐛 Bug Report: Backstage Github auth is not working. HOT 5
- 🐛 Bug Report: Running yarn dev starts only frontend customized plugin and not its backend in port 7007 HOT 4
- Question: permissions conditional rules HOT 2
- 🚀 Feature: new frontend system legacy plugin converter HOT 1
- 🚀 Feature: Ability to enrich entities created from ingestion of org data HOT 1
- 🐛 Bug Report: AWS catalog module package missing entity processors export HOT 8
- 🐛 Bug Report: plugin-catalog-backend-module-gitlab-org errors HOT 8
- 🐛 Bug Report: <Kubernetes Plugin rendering issue> HOT 3
- 🐛 Bug Report: Environment APP_CONFIG_ variables including hyphens are not valid identifiers HOT 6
- 🚀 Feature: Documentation Request: Update guide "Writing Custom Actions" showing how to leverage Backstage CLI HOT 3
- 🚀 Feature: Allow defining allow rules for catalog providers HOT 4
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 backstage.