Skip to content

Commit

Permalink
Add Astro.generator to API reference (withastro#1231)
Browse files Browse the repository at this point in the history
* feat: add generator to API reference

* Update src/pages/en/reference/api-reference.md

Co-authored-by: Chris Swithinbank <[email protected]>

* Update api-reference.md

* Update api-reference.md

* Update api-reference.md

Co-authored-by: Nate Moore <[email protected]>
Co-authored-by: Chris Swithinbank <[email protected]>
  • Loading branch information
3 people authored Aug 8, 2022
1 parent 2e3aced commit 068ec9b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/pages/en/reference/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,24 @@ const ip = Astro.clientAddress;

`Astro.site` returns a `URL` made from `site` in your Astro config. If undefined, this will return a URL generated from `localhost`.

### `Astro.generator`

<Since v="1.0.0" />

`Astro.generator` is a convenient way to add a [`<meta name="generator">`](https://html.spec.whatwg.org/multipage/semantics.html#meta-generator) tag with your current version of Astro. It follows the format `"Astro v1.x.x"`.

```astro mark="Astro.generator"
<html>
<head>
<meta name="generator" content={Astro.generator} />
</head>
<body>
<footer>
<p>Built with <a href="https://astro.build">{Astro.generator}</a></p>
</footer>
</body>
</html>
```

### `Astro.slots`

Expand Down

0 comments on commit 068ec9b

Please sign in to comment.