Skip to content

Commit

Permalink
Remove blog tech debt (#4455)
Browse files Browse the repository at this point in the history
* removed blog structured data from structured data helper

* deleted views/blog folder and contents

* removed blog_structured_data from rspec test and deleted views/layouts/blog folder and contents

* deleted BlogHelper and spec file

* removed BlogController

* removed controllers/blog folder which included tag_controller

* removed config for blog structured data from prod and dev files

* removed models/pages/blog.rb and spec file

* removed references to blog in content_pages_spec file

* removed blog from sitemap controller

* removed blog_posting from structured data spec

* removed references to blog in routes.rb

* removed blog scss file and import to git

* renamed images/content/blog to how-to-apply-for-teacher-training to house notepad image. Edited paths

* removed references to blog in images.yml file

* re-instated 2 external link redirects to routes.rb as per review comments

* renamed folder containing notepad image and edited paths

* removed spec/support/views/content/blog/post_invalid_tag.md and blog folder
  • Loading branch information
sarahcrack authored Jan 9, 2025
1 parent 44eb4a5 commit e5524ff
Show file tree
Hide file tree
Showing 30 changed files with 7 additions and 806 deletions.
20 changes: 0 additions & 20 deletions app/controllers/blog/tag_controller.rb

This file was deleted.

35 changes: 0 additions & 35 deletions app/controllers/blog_controller.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/controllers/sitemap_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class SitemapController < ApplicationController
# This will keep it consistent with how canonical-rails behaves and ensure search engines are happy.
OTHER_PATHS = %w[
/events
/blog
/events/about-get-into-teaching-events
/mailinglist/signup/name
].freeze
Expand Down
15 changes: 0 additions & 15 deletions app/helpers/blog_helper.rb

This file was deleted.

20 changes: 0 additions & 20 deletions app/helpers/structured_data_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,6 @@ def structured_data(type, data)
end
end

def blog_structured_data(page)
frontmatter = page.frontmatter
author_name = frontmatter[:author]

data = {
headline: frontmatter[:title],
image: frontmatter[:images]&.values&.map { |h| asset_pack_url(h["path"]) },
datePublished: frontmatter[:date],
keywords: frontmatter[:keywords],
author: [
{
"@type": author_name.present? ? "Person" : "Organization",
name: author_name || "Get Into Teaching",
},
],
}.compact

structured_data("BlogPosting", data)
end

def government_organization_structured_data
data = {
"@context": "https://schema.org",
Expand Down
55 changes: 0 additions & 55 deletions app/models/pages/blog.rb

This file was deleted.

7 changes: 0 additions & 7 deletions app/views/blog/_date_and_author.html.erb

This file was deleted.

5 changes: 0 additions & 5 deletions app/views/blog/_header.html.erb

This file was deleted.

3 changes: 0 additions & 3 deletions app/views/blog/_highlights.erb

This file was deleted.

17 changes: 0 additions & 17 deletions app/views/blog/_post_preview.html.erb

This file was deleted.

5 changes: 0 additions & 5 deletions app/views/blog/_tag_list.html.erb

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions app/views/blog/index.html.erb

This file was deleted.

10 changes: 0 additions & 10 deletions app/views/blog/tag/show.html.erb

This file was deleted.

2 changes: 1 addition & 1 deletion app/views/content/how-to-apply-for-teacher-training.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ layout: "layouts/category"
content:
- content/how-to-apply-for-teacher-training/questions
- content/how-to-apply-for-teacher-training/why-teach
image: "static/images/content/blog/notepad.jpg"
image: "static/images/content/application/notepad.jpg"
---
23 changes: 0 additions & 23 deletions app/views/layouts/blog/index.html.erb

This file was deleted.

60 changes: 0 additions & 60 deletions app/views/layouts/blog/post.html.erb

This file was deleted.

Loading

0 comments on commit e5524ff

Please sign in to comment.