Skip to content
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

Contentlayer를 사용할때 Nextra 처럼 이미지 최적화를 할 수 없는 이유 #68

Open
youngkyo0504 opened this issue Aug 16, 2024 · 0 comments

Comments

@youngkyo0504
Copy link
Owner

템플릿 예시입니다.

title:
full_path: src/pages/.md


Contentlayer 는 next remote 형식을 사용한다. MDX파일에서 import를 할 수 없다. 

하지만 mdx bundler를 이용하는 nextra는 import가 가능하다. (뇌피셜) 

Nextra에서 static image를 ![]()  이런 마크다운 문법으로 작성하면 빌드할 때 알아서 import img_1 from '경로' 같은 임포트 문을 넣어준다. 

(remark plugin)으로 인해서...

하지만 Contentlayer에서는 이런 방법을 사용하지 못한다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant