Skip to content
Snippets Groups Projects
Unverified Commit e0e647b3 authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

fix

parent 4b424013
No related branches found
No related tags found
No related merge requests found
......@@ -46,15 +46,15 @@ class Communication::Website < ApplicationRecord
end
def git_dependencies_static
dependencies = [
pages, pages.map(&:explicit_active_storage_blobs).flatten,
posts, posts.map(&:explicit_active_storage_blobs).flatten,
home, home.explicit_active_storage_blobs,
categories, menus, people, about
]
dependencies = (
pages + pages.map(&:active_storage_blobs).flatten +
posts + posts.map(&:active_storage_blobs).flatten +
[home] + home.explicit_active_storage_blobs +
categories + menus + people + [about]
)
if about.is_a? Education::School
dependencies << about.programs
dependencies += about.programs
elsif about.is_a? Research::Journal
dependencies.concat [about.articles, about.volumes]
end
......
---
title: >
<%= @page.title %>
url: "<%= @page.path %>"
url: "<%= @page.path %>/"
position: <%= @page.position %>
<% if @page.best_featured_image.attached? %>
image: "<%= @page.best_featured_image.blob.id %>"
image_alt: "<%= @page.featured_image_alt %>"
<% end %>
<% if @page.category %>
category: "<%= @page.category.path %>"
<% if @page.related_category %>
category: "<%= @page.related_category.path %>/"
<% end %>
description: >
<%= prepare_for_github @page.description, @page.university %>
......
......@@ -12,7 +12,7 @@ authors:
<% if @post.categories.any? %>
categories:
<% @post.categories.each do |category| %>
- "<%= category.path %>"
- "<%= category.path %>/"
<% end %>
<% end %>
<% if @post.featured_image.attached? %>
......
---
title: >
<%= @program.name %>
url: /<%= @website.programs_github_directory %><%= @program.path %>
url: /<%= @website.programs_github_directory %><%= @program.path %>/
description: >
<%= prepare_for_github @program.description, @program.university %>
position: <%= @program.position %>
......@@ -9,7 +9,7 @@ position: <%= @program.position %>
image: "<%= @program.best_featured_image.blob.id %>"
image_alt: "<%= @program.featured_image_alt %>"
<% end %>
category: "<%= @website.categories.find_by(program_id: @program.id)&.path %>"
category: "<%= @website.categories.find_by(program_id: @program.id)&.path %>/"
teachers:
<% @program.teachers.includes(:person).ordered.each do |teacher| %>
- person: "<%= teacher.person.slug %>"
......
......@@ -3,7 +3,7 @@ title: "<%= @article.title %>"
description: "<%= @article.abstract %>"
volume: "<%= @article.volume.id %>"
publication: "<%= @article.published_at %>"
pdf: "<%= @article.pdf_path %>"
pdf: "<%= @article.pdf_path %>/"
keywords: "<%= @article.keywords %>"
researchers:
<% @article.researchers.each do |researcher| %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment