Skip to main content

examples/basic/layouts/post.html

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title><%= @entry.data.title %> — Astral Basic</title>
    <script type="module" src="<%= Astral.asset_path(@site, "app.ts") %>"></script>
  </head>
  <body>
    <header class="site-header">
      <a class="brand" href="/">Astral Basic</a>
      <nav aria-label="Main navigation">
        <a href="/about/">About</a>
        <a href="/blog/hello-astral/">Blog</a>
        <a href="/landing/">Landing</a>
      </nav>
    </header>

    <article class="page post" data-route="<%= @route %>">
      <p class="eyebrow">Collection: <%= @entry.collection %></p>
      <h1><%= @entry.data.title %></h1>
      <p class="post-meta"><%= @entry.data.date %> · <%= Enum.join(Map.get(@entry.data, :tags, []), ", ") %></p>
      <%= @content %>
    </article>

    <footer class="site-footer">
      Built with Astral and Volt.
    </footer>
  </body>
</html>