我想将 React 代码添加到 Markdown 文件中
我有一个由 Docusaurus 生成的静态网站,并且添加了 firebase 身份验证,它工作正常,但我的 markdown 文件的路径仍然不安全(每个人都可以在没有身份验证的情况下访问它)。是否可以将此代码添加到 markdown 文件中?
..
const [user, loading, error] = useAuthState(auth);
const navigate = useHistory();
useEffect(() => {
if (loading) return;
if (!user) return navigate.push("/");
}, [user, loading]);
..
请提供任何帮助以使这成为可能
I have a static website generated by Docusaurus and I added firebase authentication it works fine but the path to my markdown files still not secured (everyone can access it without authentication). Is it possible to add this code to markdown files ?
..
const [user, loading, error] = useAuthState(auth);
const navigate = useHistory();
useEffect(() => {
if (loading) return;
if (!user) return navigate.push("/");
}, [user, loading]);
..
Please any help to make this possible
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论