-
Notifications
You must be signed in to change notification settings - Fork 203
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
mathjax / katex / latex rendering for the markdown #22
Comments
Did you ever get this working? |
@fullpwemium sorry If I am bothering you but you seem to have made it possible with this starter kit and the latex rendering. Could you help me get it set up? Currently the way to create the same issue as I have currently is to working $ gridsome create test-latex https://github.com/gridsome/gridsome-starter-blog.git
$ cd test-latex
$ gridsome develop when updating the dependencies "@gridsome/remark-prismjs": "^0.1.0",
"@gridsome/source-filesystem": "^0.5.0",
"@gridsome/transformer-remark": "^0.3.2",
"gridsome": "^0.6.5 running $ rm -rf .cache
$ rm -rf node_modules
$ npm install
$ gridsome develop I get Module build failed (from ./node_modules/gridsome/lib/plugins/vue-components/lib/loaders/page-query.js):
Error: Cannot query field "coverImage" on type "Post". Did you mean "cover_image"?
GraphQL request:74:5
73 | content
74 | coverImage (width: 860, blur: 10)
| ^
75 | }
at Object.module.exports (/Users/ericleijonmarck/dev/test-latex/node_modules/gridsome/lib/plugins/vue-components/lib/loaders/page-query.js:28:21) Am I deleting the |
@eleijonmarck looks right to me here is the blog starter incase it helps https://github.com/gridsome/gridsome-starter-markdown-blog |
@fullpwemium hmmm 🤔 I get the correct output now with images and latex. But no syntax highlighting Interesting I may have found the issue. Since I want code highlighting as well. I use ['@gridsome/remark-prismjs'] with "@gridsome/remark-prismjs": "^0.1.0", This is the one causing the issue. |
@eleijonmarck I don't use prismjs, I use shiki... why don't you try it? |
@fullpwemium Oh ma gad! Thank you. Let's continue to figure this out together. :) my blog will be available here https://eleijonmarck.dev for reference. |
I have been looking for plugins / components to use to be able to use latex expressions in blog posts.
this markdown
becomes:
I get the following Error for the timeToRead property and the content property
Do we need to handle the content in some way for the rendering to take place for the places of latex expressions?
Found the issue solved on vuepress: vuejs/vuepress#113
Could we do something similar maybe? I cannot see how we can use it:
gridsome-starter-blog/gridsome.config.js
Line 17 in c594069
Found the issue of the remark/prism plugin we are using:
gridsome/gridsome#238
Steps to reproduce
$ gridsome create test-remark-math https://github.com/gridsome/gridsome-starter-blog.git
$ npm install remark-math remark-html-katex remark-html
timeToRead
in DevTool console. Removing those for the graphql query yields the error on the content part for any markdown where$
is used.The text was updated successfully, but these errors were encountered: