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

Merge branch 'master' of github.com:noesya/osuny

parents 487d8bb8 a2c98d00
No related branches found
No related tags found
No related merge requests found
......@@ -51,10 +51,6 @@ class Research::Journal::Article < ApplicationRecord
scope :ordered, -> { order(:published_at, :created_at) }
def pdf_path
"/assets/articles/#{id}/#{pdf.filename}"
end
def git_path(website)
"content/articles/#{published_at.year}/#{published_at.strftime "%Y-%m-%d"}-#{slug}.html" if published_at
end
......
......@@ -55,6 +55,10 @@ class Research::Journal::Volume < ApplicationRecord
[self] + active_storage_blobs
end
def path
"#{published_at&.year}/#{slug}" if published_at
end
def to_s
"##{ number } #{ title }"
end
......
---
title: "<%= @article.title %>"
description: "<%= @article.abstract %>"
volume: "<%= @article.volume.id %>"
publication: "<%= @article.published_at %>"
pdf: "<%= @article.pdf_path %>/"
keywords: "<%= @article.keywords %>"
description: >
<%= @article.abstract %>
<% if @article.volume && @article.volume.path %>
volumes:
- "<%= @article.volume.path %>"
<% end %>
weight: 1
date: <%= @article.published_at %> UTC
keywords: >
<%= @article.keywords %>
researchers:
<% @article.researchers.each do |researcher| %>
- "<%= researcher.id %>"
......
---
title: "<%= @volume.title %>"
slug: "<%= @volume.slug %>"
number: <%= @volume.number %>
issn: "<%= @volume.journal.issn %>"
keywords: "<%= @volume.keywords %>"
date: "<%= @volume.published_at %>"
keywords: >
<%= @volume.keywords %>
date: <%= @volume.published_at %> UTC
<% if @volume.featured_image.attached? %>
image: "<%= @volume.featured_image.blob.id %>"
image_alt: "<%= @volume.featured_image_alt %>"
<% end %>
articles:
<% @volume.articles.each do |article| %>
- <%= article.path %>
<% end %>
---
<%= @volume.description %>
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