Boostnote code mirror6/24/2023 ![]() But, while rendering, Next.js won't serve API routes, so page components will fail to fetch data from API routes. next export pre-renders every page into HTML from the output of the next build script to mimic SSR. To know the reason, we need to understand how the next export script works. It is really cool too because it lets me make serverless apps with no extra configuration. Synta圎rror: unknown: Unterminated JSX contents ( 102: 16)ġ05 | MDXContent.isMDXComponent = true Do NOT use API routes for static HTML exportingįrom Next.js v9, Zeit introduced the API routes feature. So, if you're going to migrate old markdown content into MDX, please make sure that all tags are closed./pages/posts/monorepo-and-lerna.md But the problem was that I forgot to close an tag in the middle of the article. At first, I thought the configurations for Babel or Webpack were wrong. As you see in the below error message, it doesn't say which JSX contents are not closed. Moreover, the error message looks really confusing. Therefore, MDX forces us to close all tags too. But, JSX syntax always forces us to close tags. As you know, in HTML5, you are supposed to write the tag without closing. One of the articles in my old blog was using tags. But supporting JSX might causes some problems. Also, via MDXProvider, you could set the layout components from outside the MDX file. So you can mix markdown and JSX(rendered from React Component) in your markdown articles. MDX introduced itself as a superset of markdown with JSX supporting. In this section, I want to share the cause of my suffering. I'd been undergoing lots of trial and error too. To be honest, the biggest reason for the delay was that I played Apex Legends too much. I thought I could finish it in a week but it took almost a month. I listened to this song while writing this article.īut, although I'm quite motivated, the renewal was not easy. To fix it, I think blogging in English should be one of the best ways. So now, I can speak and write English without hesitation. Although I'm living in Japan and Korea, I'm using English most of the time because my girlfriend is from the US and my coworkers are from the UK and France. For the past year, my English has improved quite a lot. The last reason is that I want to improve my English ability. ![]() So I fixed up the stage to start my show again. But, sadly, I realized that I don't have enough channels to share these ideas. My colleagues also like them a lot because they are fixing most problems of the current conventional solutions. So I'm VERY MOTIVATED NOW! And, while working on the Boostnote.next project, I've been inventing lots of interesting tools like prismy. Since the beginning of last August, my company's let me fully focus on the renewal of our Boostnote project, AKA Boostnote.next. But now, I'll definitely recommend it to others.Īnother reason is that I want to share my ideas. I guess the biggest reason was that I don't know Ruby language.(And I don't want to learn it either.Haha) Also, as a member of unifiedjs colletive, I want to try MDX which is based on Remark. It was kind of OK, but I was not happy about it. I want to try fancy new stacks, Next.js and MDX more. So in this article, I want to share how I renewed my blog. Good news is that next version(v6) of codemirror will be written in Typescript although it is still in prototype status.I've renewed my blog with Typescript, Next.js and MDX to start blogging again. Written in Javascript(Type definition might not be perfect).And due to they don't support mobile device, we couldn't expect that any problems in mobile can be fixed. But making one should take long time and lots of effort. I guess we eventually have our own markdown editor one day. The problem is we might use different editor for mobile app. Don't support mobile device(You can still use it).If you know another better solution, please leave a comment about it. ( □ for Monaco, □ for codemirror as I did in this issue.) Leave a comment to add more Pros and Cons.Both of them are quite powerful and battle tested. For default editor, I'm think between Monaco and Codemirror.
0 Comments
Leave a Reply. |