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

html macro #200

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

html macro #200

wants to merge 8 commits into from

Conversation

takurinton
Copy link
Owner

@takurinton takurinton commented Jul 6, 2024

https://github.com/takurinton/blog.takurinton.dev/blob/main/generator/src/main.rs#L237-L247

ここらへんの書き味をこのような感じにすることを目指す。

let html = render! {
  <div class="post">
    <a class="post-title" href="/post/{id}/index.html">{title}</a>
      <p class="date">{created_at}</p>
      <p class="description">{markdown::html_to_string(rendered_html)}</p>
  </div>
}

ここでは単に macro から string の html を吐く処理だけ。
今後は client rendering(hydration) に対応する。

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

Successfully merging this pull request may close these issues.

None yet

1 participant