dwyl / ampl

:iphone: :zap: Ampl transforms Markdown into AMP-compliant html so it loads super-fast!
GNU General Public License v2.0
58 stars 3 forks source link

Allow custom header #25

Open michaelmior opened 8 years ago

michaelmior commented 8 years ago

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 commented 8 years ago

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

des-des commented 8 years ago

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 commented 8 years ago

@michaelmior Feel free to elaborate on suggested requirements!

@des-des Thanks!

michaelmior commented 8 years ago

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:

michaelmior commented 8 years ago

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

nelsonic commented 8 years ago

@michaelmior can you please confirm if this change https://github.com/dwyl/ampl/commit/154197f5ebe94d4f817d6fa8ba8a3949b0f98f73 serves your purpose. thanks! :+1:

michaelmior commented 8 years ago

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 commented 8 years ago

@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 commented 8 years ago

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 commented 8 years ago

@michaelmior thanks that's really helpful. :)