this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add og tags & images

+99 -5
+2
Gemfile
··· 75 75 end 76 76 77 77 gem "redcarpet", "~> 3.6" 78 + 79 + gem "himg", "~> 0.0.12"
+2
Gemfile.lock
··· 116 116 activerecord (>= 4.0.0) 117 117 globalid (1.2.1) 118 118 activesupport (>= 6.1) 119 + himg (0.0.12-x86_64-linux) 119 120 i18n (1.14.4) 120 121 concurrent-ruby (~> 1.0) 121 122 importmap-rails (2.0.1) ··· 276 277 debug 277 278 devise 278 279 friendly_id (~> 5.5.0) 280 + himg (~> 0.0.12) 279 281 importmap-rails 280 282 jbuilder 281 283 paperclip (~> 5.1.0)
+3 -3
app/assets/stylesheets/application.css
··· 176 176 background: transparent; 177 177 color: #4f6599; 178 178 border-left: none; 179 - font-size: small; 179 + font-size: 1rem; 180 180 } 181 181 182 182 .pbody code { ··· 188 188 display: block; 189 189 background: #303446; 190 190 color: #c6d0f5; 191 - font-size: small; 191 + font-size: 1rem; 192 192 } 193 193 194 194 .pbody pre code { 195 - padding-top: 0 !important; 195 + /* padding-top: 0 !important; */ 196 196 white-space: preserve; 197 197 } 198 198
+2 -1
app/controllers/articles_controller.rb
··· 1 1 class ArticlesController < ApplicationController 2 2 before_action :authenticate_user!, :except => [:show, :index] 3 - 3 + 4 4 def index 5 5 @article = Article.all 6 6 @tags = Tag.all ··· 18 18 end 19 19 20 20 def show 21 + himg_config(width: 720, height: 405, disable_fetch: false, base_url: "file:///home/kat/rubytest/blog/") 21 22 @article = Article.friendly.find(params[:id]) 22 23 end 23 24
+63
app/views/articles/show.himg.erb
··· 1 + <!DOCTYPE html> 2 + <html lang="en"> 3 + 4 + <head> 5 + <style> 6 + @import url(https://fonts.bunny.net/css?family=gudea:400|raleway:300); 7 + 8 + html { 9 + margin: 0; 10 + padding: 0; 11 + } 12 + 13 + body { 14 + font-family: 'Gudea', 'sans-serif'; 15 + font-size: 1.1rem; 16 + padding: 1em; 17 + background: #e8effc; 18 + color: #4f6599; 19 + } 20 + 21 + h1 { 22 + color: #4f6599; 23 + font-size: 2.5rem; 24 + margin: 0 0 .5rem 0 !important; 25 + padding: 0 !important; 26 + } 27 + 28 + img { 29 + margin-right: 15px; 30 + width: 100px !important; 31 + height: 100px !important; 32 + } 33 + 34 + p { 35 + font-size: 1.2rem; 36 + } 37 + 38 + .himg-tag { 39 + color: #509145; 40 + } 41 + 42 + .himg-tag::before { 43 + content: "#"; 44 + } 45 + 46 + .himg-link { 47 + color: #509145; 48 + font-size: .99rem; 49 + } 50 + </style> 51 + </head> 52 + 53 + <body> 54 + 55 + <h1><%= @article.title %></h1> 56 + 57 + <%= image_tag ActiveStorage::Blob.service.path_for(@article.icon.key) %> 58 + 59 + <p><%= @article.created_at.strftime('%Y %b %d') %>, <span class="himg-tag"><%= @article.tag.name %></span></p> 60 + 61 + </body> 62 + 63 + </html>
+20
app/views/articles/show.html.erb
··· 37 37 <% else %> 38 38 <% end %> 39 39 40 + <hr> 41 + 42 + <style> 43 + #HCB_comment_box #hcb_form .home-desc, #HCB_comment_box .hcb-icon, #HCB_comment_box #hcb_msg { 44 + display: none; 45 + } 46 + 47 + #HCB_comment_box #HCB_comment_form_box { 48 + padding-bottom: 0; 49 + } 50 + 51 + #HCB_comment_box #no_comments, #HCB_comment_box h3 { 52 + margin: 0; 53 + } 54 + </style> 55 + 56 + <div id="HCB_comment_box"><a href="http://www.htmlcommentbox.com">Comment Form</a> is loading comments...</div> 57 + <link rel="stylesheet" type="text/css" href="https://www.htmlcommentbox.com/static/skins/bootstrap/twitter-bootstrap.css?v=0" /> 58 + <script type="text/javascript" id="hcb"> /*<!--*/ if(!window.hcb_user){hcb_user={};} (function(){var s=document.createElement("script"), l=hcb_user.PAGE || (""+window.location).replace(/'/g,"%27"), h="https://www.htmlcommentbox.com";s.setAttribute("type","text/javascript");s.setAttribute("src", h+"/jread?page="+encodeURIComponent(l).replace("+","%2B")+"&mod=%241%24wq1rdBcg%24dwFdSm%2FyIgkbp76WCPYUu."+"&opts=16798&num=10&ts=1754231621077");if (typeof s!="undefined") document.getElementsByTagName("head")[0].appendChild(s);})(); /*-->*/ </script> 59 + 40 60 </div>
+5
app/views/layouts/application.html.erb
··· 17 17 <meta name="description" content="we're gonna fly away"> 18 18 <meta name="language" content="en-US"> 19 19 <meta name="author" content="girl on the moon"> 20 + 21 + <meta property="og:title" content="<% if defined?(@article.title) %> <%= @article.title %> <% end %>"> 22 + <meta property="og:description" content="we're gonna fly away"> 23 + <meta property="og:image" content="<% if defined?(@article.slug) %> <%= article_path(@article.slug, format: :png) %> <% end %>"> 24 + 20 25 21 26 <%= csrf_meta_tags %> 22 27 <%= csp_meta_tag %>
+2 -1
start
··· 11 11 12 12 export port=3002 13 13 export RAILS_ENV=production 14 + export BASE_URL="https://bubblegum.girlonthemoon.xyz" 14 15 15 16 echo "starting new" 16 17 17 - nohup bundle exec rackup config.ru -p 3003 -o 192.168.1.219 > /dev/null 2>&1 & 18 + nohup bundle exec rackup config.ru -p 3003 -o 192.168.1.219 > log/production.log 2>&1 &