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

Allow custom header #25

Open
michaelmior opened this issue Mar 23, 2016 · 10 comments
Open

Allow custom header #25

michaelmior opened this issue Mar 23, 2016 · 10 comments

Comments

@michaelmior
Copy link

It would be great if it were possible to customize the header somehow. It seems like right now you can't even change the title of the page.

@nelsonic
Copy link
Member

@michaelmior agree. that would be super useful.
@des-des what is the plan for customising the templates?

@des-des
Copy link
Member

des-des commented Mar 23, 2016

I am not sure what people need as far as customising headers. Obvs not being able to set the title is a problem, I'll make a pull tonight!

@iteles
Copy link
Member

iteles commented Mar 23, 2016

@michaelmior Feel free to elaborate on suggested requirements!

@des-des Thanks!

@michaelmior
Copy link
Author

Thanks for the quick responses all! I'm enjoying ampl so far. My current use case is to integrate it with my static site generator so I can automatically produce AMP-enabled portions of some of my pages. There are a couple things I can think of off the top of my head that would be useful:

  • Allow generation of only the body of the page (this would make the user responsible for providing a header which results in a valid AMP document, but gives a lot more flexibility)
  • Allow the insertion of additional content in the head of the document

@michaelmior
Copy link
Author

Another important thing I realized is that there should be a way to specify the canonical URL.

des-des added a commit that referenced this issue Mar 24, 2016
also made this function recursive.
related: #25
des-des added a commit that referenced this issue Apr 3, 2016
@nelsonic
Copy link
Member

nelsonic commented Apr 6, 2016

@michaelmior can you please confirm if this change 154197f serves your purpose. thanks! 👍

@michaelmior
Copy link
Author

It looks like it does :) Although I've since decided that it's easier for me to just build all the AMP HTML myself so I'm not currently using ampl. I think there's still potential for it to be very useful. This change is definitely a step in the right direction.

@nelsonic
Copy link
Member

nelsonic commented Apr 6, 2016

@michaelmior what made you decide to build the AMP HTML features yourself?
What is/was your use-case?
is there anything we can add/remove from ampl to make it fit your needs better?

@michaelmior
Copy link
Author

Those are the right questions to ask :) I decided to produce an AMP version of my personal blog. I didn't need any of the image features provided by ampl and I needed some header customizations. This meant I wasn't really deriving a lot of benefit. It might be helpful to include easy ways to add other components such as amp-analytics.

If you're curious, the source is public and you can view the template I use for AMP pages.

@nelsonic
Copy link
Member

nelsonic commented Apr 8, 2016

@michaelmior thanks that's really helpful. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants