Comments (8)
Hi @slorber , I just reported back my finding.
The issue was solved
- I tried kind of 'binary-search', to go back 2 months ago, see whether it worked, then 1 months ago, 2w ago, etc
- I located the commit for introducing GA4 https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-google-gtag
- But I do need to use GA4 and I found if I delete the yarn.lock and
yarn install
again to regenerate it, the problem is gone - So I went back to my latest code, regenerated the yarn.lock (not via yarn install, delete it first) and the issue is solved.
I guess there could be some duplicated lib in the old yarn.lock and GA4 dependencies just made things worse. A clean deps is the key.
Nothing wrong with docusaurus or the docusaurus/plugin-google-gtag
from docusaurus.
Documented as a v3.0 breaking change:
https://docusaurus.io/docs/migration/v3#prism-react-renderer-v20
from docusaurus.
Hi @slorber , the syntax highlight was working when I upgraded to v3 (I followed that migration guide and added the additional languages). But recently got this issue
from docusaurus.
So you did something that broke it probably, and need to figure out what. As you said, it works on v3 π
from docusaurus.
Thanks for the reply. I tried to a few older version of prism and cannot get it back working. Appreciate if you can share any debug/troubleshooting tips. I don't see JS error about this, nor the build error. DOM elements seem to be okay. Not a burning issue but would like to fix it. Also the copy button was missing recently.
from docusaurus.
You should checkout older commits one by one until it works again to know which commit broke your site highlighting.
If the copy button doesn't show, it's probably that you did something reading to prism and our theme code block not even being used at all. Are you even seeing a non SQL code block being highlighted on any page?
Are you able to highlight SQL on a newly initialized site? If not, then it's a bug you should report.
Your monorepo setup is weird. We usually use workspaces and do not declare dependencies at the root. It's not possible for me to spend time investigating a monorepo setup like this, because any package/dependency can cause issue with Docusaurus. Try isolating your site in a single repo with proper dependencies and see if it works better.
from docusaurus.
Thanks @slorber for the reply. Yes, I guess the best way is to kind of git blame and try different versions to locate when this is broken. Not just SQL block, other bash/js/python code blocks are not working.
You mentioned the monorepo setup, but https://github.com/timeplus-io/docs is a repo only for the docs. I think I created it via Docusaurus CLI or template (cannot remember the details, it was 2-3 years ago)
The dependencies are only for Docusaurus.
Again, I will try 'time travel' back to the commit a few months ago, then do some kind of binary search to try to locate which commit breaking the code highlight (check out certain commit, yarn install, yarn run start)
from docusaurus.
Sorry I mistakenly saw a weird monorepo, that was probably another repro posted yesterday.
from docusaurus.
Related Issues (20)
- Index pages cannot be generated with an automatically generated siderbar HOT 1
- Document solution to "docs last update" date being rendered incorrectly when published through Vercel
- Customizing admonitions not work HOT 3
- When testing on StrictMode, the bar remains on the top HOT 1
- Node.js building getting stuck HOT 2
- Updating to @mdx-js/react 3.0.1 causes admonition blocks to stop rendering colored box HOT 8
- The <!--truncate--> line in my long blog post on the initialized website is not causing the blog post size to be limited. HOT 1
- Add trailing slash to auto generated sitemap.xml for directories only HOT 3
- blogTitle not working HOT 4
- Algolia Contextual Search Generates Incorrect FaceFilters HOT 6
- Multi-Instance Routes Not Working in v3.2.1 HOT 3
- Home page renders twice, one below the other. HOT 1
- Details elements aren't searchable - a11y issue HOT 8
- WARNβ 1 deprecated subdependencies found: [email protected] HOT 1
- npm run build fails when nmetadata are missing HOT 3
- Broken link transformation HOT 2
- Ability to Skip Homepage and Directly Access Feature Page HOT 1
- Light/Dark Mode issues on older versions of Safari 12,13, and 14 HOT 3
- Problems with locale url on homepage and blog HOT 1
- Proposal: createSitemapItems hook - a sitemap equivalent to createFeedItems
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 docusaurus.