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

imprv: Enable Marp in presentation mode #7956

Conversation

reiji-h
Copy link
Contributor

@reiji-h reiji-h commented Aug 7, 2023

概要

  • プレゼンテーションモードで Marp を使用可能にする。
  • 管理者設定で Marp が使用可能になっており、かつプレゼンテーションモードを使用する文書の frontmatter に marp: true が指定されている場合のみ、Marp によるプレゼンテーションモードを可能にする。

Task

備考

  • このタスクはプレゼンテーションモード時に Marp を呼び出せるようにしかしていない。
  • 実際に Marp のスライドを遷移させられるようになるためには、Marp とGROWI スライドの要素を揃える次のタスクが必要。

Base automatically changed from imprv/115673-115675-enable-from-adminsetting to imprv/115672-presentation-preview August 7, 2023 03:46
}
})
.process(children as string);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • この unified を使って frontmatter を解析する部分をカスタムフックとして別モジュール(ファイル)に分離させてください
  • frontmatter 解析は useEffect の外でいいのではないか?(未検証)
    • そうであれば setMarp を用意する useState も不要だと思う

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • parse-slide-frontmatter.ts として分離しました。
  • useEffect の外でも問題なかったので、useState と合わせて使用しないように修正しました。

@yuki-takei yuki-takei merged commit 39b21d2 into imprv/115672-presentation-preview Aug 21, 2023
@yuki-takei yuki-takei deleted the imprv/115673-126792-use-marp-in-presentation branch August 21, 2023 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants