Rails truncate with a 'read more' toggle

后端 未结 2 1614
情深已故
情深已故 2021-01-04 09:33

I have a paragraph that I want truncated with the option of clicking \"read more\" and have it slide open with the rest of the content. The content is coming from a databas

2条回答
  •  天涯浪人
    2021-01-04 10:25

    I know I am joining this conversation a bit late. I have been tackling the same issue, trying the solution above, which works just fine. However, SEO wise content that has been hidden wasn't indexed by search engines. I checked in Lynx too and the link can not be followed (obviously). So settled for the this solution by Jed Foster | readmore.js - lynx can read it properly and now I am waiting for the SE index to update and see if I can find myself in the search results. Just in case someone is in a similar situation...

提交回复
热议问题