Coder Social home page Coder Social logo

takafumir / rails_amp Goto Github PK

View Code? Open in Web Editor NEW
65.0 6.0 26.0 162 KB

RailsAmp is a Ruby on Rails plugin for AMP(Accelerated Mobile Pages).

License: MIT License

Ruby 86.15% Logos 0.20% HTML 11.17% JavaScript 1.49% CSS 0.99%
amp rails rails-amp amphtml amp-html html ruby accelerated-mobile-pages

rails_amp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rails_amp's Issues

How to target a controller inside a directory?

Hi! I wanted to know how can I target inside rails_amp.yml to a controller inside a directory.

E.G. I want to target both controllers/posts_controller#show and controller/blog/posts_controller#show. I have tried the following but it seems not to be working:

targets:
  posts: show
  blog_posts: show 

Controller instance variables return `nil` systematically and ActionView::Helpers methods are overriden

Hi,

I'm having an issue when trying to access the AMP version of a Rails view in my local environement

What happens is :

# app/controllers/pages_controller.rb
class PagesController < ApplicationController
  def my_action
    @my_instance_var = "some data"
  end
end

# app/views/pages/my_action.html.erb
<%= @my_instance_var %> #=> returns nil

Context :

  • Bug happening on multipleRails projects, all of which version is 4.2.10
  • Ruby version is 2.6.2

Any insights?

cloudinary gem & rails_amp

if using this gem with cloudinary gem, the cloudinary helper:

cl_image_tag (which is a wrapper to image_tag, used to create img tags with cloudinary parameters)

creates an infinite loop which throws:

SystemStackError (stack level too deep)

Support for Rails 5.1

I am wondering if rails_amp works with Rails 5.1. If not, any plan to update it? Thank you.

Using rails_amp with actiontext

To display article body, I use actiontext (0.1.0) in conjunction with activestorage (5.2.3).

I don't have amp-img tag substitution. The HTML code does not change for the AMP version of the site.

And I get errors in google search console.
How can this problem be solved?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.