diff --git a/.gitignore b/.gitignore index df2840a..24234b3 100644 --- a/.gitignore +++ b/.gitignore @@ -52,4 +52,6 @@ package-lock.json .idea/ #sitemap -/public/sitemap.xml.gz \ No newline at end of file +/public/sitemap.xml.gz + +sitespeed-result/ diff --git a/Gemfile b/Gemfile index bf57e9a..7eb72a5 100644 --- a/Gemfile +++ b/Gemfile @@ -16,7 +16,7 @@ end gem "actionpack-action_caching", "~> 1.2" gem "active_record_union", "~> 1.3" gem "acts-as-taggable-on", "~> 5.0" -gem "acts_as_follower", github: "thepracticaldev/acts_as_follower", branch: "master" +gem "acts_as_follower", github: "tcocca/acts_as_follower", branch: "master" gem "addressable", "~> 2.5", ">= 2.5.2" gem "administrate", "~> 0.11" gem "ahoy_email", "~> 0.5" @@ -122,7 +122,7 @@ group :development, :test do gem "derailed", "~> 0.1" gem "erb_lint", "~> 0.0", require: false gem "faker", git: "https://github.com/stympy/faker.git", branch: "master" - gem "fix-db-schema-conflicts", github: "thepracticaldev/fix-db-schema-conflicts", branch: "master" + gem "fix-db-schema-conflicts" gem "memory_profiler", "~> 0.9" gem "parallel_tests", "~> 2.27" gem "pry-byebug", "~> 3.7" diff --git a/Gemfile.lock b/Gemfile.lock index 331bf9c..7826b41 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,21 +7,13 @@ GIT i18n (>= 0.7) GIT - remote: https://github.com/thepracticaldev/acts_as_follower.git - revision: 288690cd99bc470eaee493fce5bfa9fe23157692 + remote: https://github.com/tcocca/acts_as_follower.git + revision: c5ac7b9601c4af01eb4d9112330b27be4d694ecc branch: master specs: acts_as_follower (0.2.1) activerecord (>= 4.0) -GIT - remote: https://github.com/thepracticaldev/fix-db-schema-conflicts.git - revision: 4172392392e1a8d907f7ab673cb5ddd9a4a31940 - branch: master - specs: - fix-db-schema-conflicts (3.0.2) - rubocop (>= 0.38.0) - GEM remote: https://rubygems.org/ remote: https://rails-assets.org/ @@ -322,6 +314,8 @@ GEM thor (~> 0.14) fission (0.5.0) CFPropertyList (~> 2.2) + fix-db-schema-conflicts (3.1.0) + rubocop (>= 0.38.0) fog (1.41.0) fog-aliyun (>= 0.1.0) fog-atmos @@ -992,7 +986,7 @@ DEPENDENCIES fastly-rails (~> 0.8) feedjira (~> 2.2) figaro (~> 1.1) - fix-db-schema-conflicts! + fix-db-schema-conflicts fog (~> 1.41) front_matter_parser (~> 0.2) gemoji (~> 3.0.0) diff --git a/app/controllers/stories_controller.rb b/app/controllers/stories_controller.rb index df60029..9373ec2 100644 --- a/app/controllers/stories_controller.rb +++ b/app/controllers/stories_controller.rb @@ -3,6 +3,15 @@ class StoriesController < ApplicationController before_action :set_cache_control_headers, only: %i[index search show] def index + push_headers = [ + "<#{view_context.asset_path('bell.svg')}>; rel=preload; as=image", + "<#{view_context.asset_path('menu.svg')}>; rel=preload; as=image", + "<#{view_context.asset_path('connect.svg')}>; rel=preload; as=image", + "<#{view_context.asset_path('stack.svg')}>; rel=preload; as=image", + "<#{view_context.asset_path('lightning.svg')}>; rel=preload; as=image", + ] + response.headers["Link"] = push_headers.join(", ") + add_param_context(:username, :tag) return handle_user_or_organization_or_podcast_index if params[:username] return handle_tag_index if params[:tag] diff --git a/app/views/layouts/_top_bar.html.erb b/app/views/layouts/_top_bar.html.erb index bf2750f..fca6cfe 100644 --- a/app/views/layouts/_top_bar.html.erb +++ b/app/views/layouts/_top_bar.html.erb @@ -13,11 +13,11 @@ WRITE A POST - <%= inline_svg("connect.svg", size: "100% * 100%") %> + <%= image_tag("connect.svg", size: "100% * 100%") %> - <%= inline_svg("bell.svg", size: "100% * 100%") %> + <%= image_tag("bell.svg", size: "100% * 100%") %>