The head Element
Nearly all websites have a <head>. This element is responsible for everything that does not appear on the page. Users can place elements within the <head> element to configure many aspects of the website. This includes, but not limited to:
- The title of the page (what you see on your tabs)
- The thumbnail preview of the page (when you share links with friends)
- The preview description of the page (when you share links with friends)
- Whether a bot should scrape this website (like Google's search engine)
Ammonite allow users to configure this metadata using a YAML at the top of each page: See Metadata
Example HTML
<html>
<head>
<title>My Webpage Title</title>
<meta name="description" content="My first webpage using Ammonite">
<meta name="twitter:image:src" content="https://link_to_image">
<meta name="twitter:site" content="@abc">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="My Webpage Title">
<meta name="twitter:description" content="My first webpage using Ammonite">
<meta property="og:image" content="https://link_to_image">
<meta property="og:image:alt" content="My first webpage using Ammonite">
<meta property="og:site_name" content="Ammonite">
<meta property="og:type" content="website">
<meta property="og:title" content="My Webpage Title">
<meta property="og:url" content="https://ammonite.dev/proj/test/p/test_page">
<meta property="og:description" content="My first webpage using Ammonite">
</head>
<body>
<!-- content -->
</body>
</html>