# AMP for custom pages

**URL:** <https://forum.ghost.org/t/amp-for-custom-pages/2666>\
**Category:** Developer help\
**Created:** [August 26, 2018, 8:45pm UTC](https://forum.ghost.org/t/amp-for-custom-pages/2666 "2018-08-26T20:45:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HauntedThemes](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/hauntedthemes/32/15301_2.png) [@HauntedThemes](https://forum.ghost.org/u/HauntedThemes)\
**Post date:** [August 26, 2018, 8:45pm UTC](https://forum.ghost.org/t/amp-for-custom-pages/2666/1 "2018-08-26T20:45:05Z")

</div>

Hi,

I’m trying to see if there is a way to create an AMP version of a custom page or homepage. I’m just wondering if it is feasible. Here is what I came up with:

```auto
<!DOCTYPE html>

{{#is "page"}}
    {{#post}}
        {{#has slug="welcome"}}
            <html ⚡>
                <head>
                    <!-- Manually add meta data in here -->
                    <!-- Manually add <style amp-custom> -->
                    <script async src="https://cdn.ampproject.org/v0.js"></script>
                    <script async custom-element="amp-anim" src="https://cdn.ampproject.org/v0/amp-anim-0.1.js"></script>
                </head>
                <body class="amp-template">
        {{else}}
            <html lang="{{lang}}">
                <head>
                    {{> theme_head}}

                    {{!-- Ghost outputs important style and meta data with this tag --}}
                    {{ghost_head}}

                    <!-- Manually add this meta tag in Code Injection for this page -->
                    <link rel="amphtml" href="http://localhost:2369/welcome/amp/" />

                </head>
                <body class="{{body_class}} nav-closed">
        {{/has}}
    {{else}}
        <!-- Fix other posts -->
    {{/post}}
{{/is}}

```

I know that this is an ugly way to do it. I’m just curios if this is possible or if AMP needs something more to work. What do you think?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [September 9, 2018, 8:45pm UTC](https://forum.ghost.org/t/amp-for-custom-pages/2666/2 "2018-09-09T20:45:09Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
