Giter VIP home page Giter VIP logo

Comments (4)

zerodevx avatar zerodevx commented on June 3, 2024

Which framework are you using?

For one, it feels like in your render call:

app.render(<zero-md src="https://raw.githubusercontent.com/wechaty/openapi/main/CHANGELOG.md"></zero-md>, target)

the first param should be quoted:

app.render(`<zero-md src="https://raw.githubusercontent.com/wechaty/openapi/main/CHANGELOG.md"></zero-md>`, target)

Also, https://raw.githubusercontent.com/wechaty/openapi/main/CHANGELOG.md returns a 404.

from zero-md.

zerodevx avatar zerodevx commented on June 3, 2024

I'm not sure what's going on. AFAICT, if you're using mdxjs to handle markdown transformation, then you probably don't need <zero-md>?

from zero-md.

antonym avatar antonym commented on June 3, 2024

@zerodevx I'm trying to do the same thing using latest Docusaurus. It will render in yarn start but when I try and yarn build, I get the following error.

yarn run v1.22.10
$ docusaurus build

[en] Creating an optimized production build...

✔ Client
✖ Server
  Compiled with some errors in 5.55s

Docusaurus Node/SSR could not render static page with path=/docs/changelog because of error: HTMLElement is not defined

ReferenceError: HTMLElement is not defined
error building locale=en
Error: Failed to compile with errors.
    at .../node_modules/@docusaurus/core/lib/webpack/utils.js:202:24
    at .../node_modules/webpack/lib/MultiCompiler.js:554:14
    at processQueueWorker (.../node_modules/webpack/lib/MultiCompiler.js:491:6)
    at processTicksAndRejections (node:internal/process/task_queues:78:11)

The change log being docs/changelog.mdx

---
id: changelog
title: Changelog
description: changelog
hide_table_of_contents: true
---
import ZeroMd from 'zero-md'

<zero-md src='https://url-to-changelog.com/CHANGELOG.md'></zero-md>

from zero-md.

zerodevx avatar zerodevx commented on June 3, 2024

@antonym There should be a way to exclude zero-md from SSR. The component should be rendered client-side, not pre-rendered server-side.

from zero-md.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.