Skip to content
Snippets Groups Projects
Commit 5fc76747 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

wip

parent 546d2601
No related branches found
No related tags found
No related merge requests found
......@@ -8,22 +8,23 @@
pages:
<% block.template.selected_pages.each do |element| %>
- page: "<%= element.path %>"
data:
title: >-
<%= prepare_text_for_static element.title %>
summary: >-
<%= prepare_text_for_static element.summary, 7 %>
url: "<%= element.path %>"
bodyclass: >-
<%= prepare_text_for_static element.bodyclass, 7 %>
<% if element.best_featured_image.attached?%>
image:
id: "<%= element.best_featured_image.id %>"
alt: >-
<%= prepare_text_for_static element.best_featured_image_alt, 7 %>
credit: >-
<%= prepare_html_for_static element.best_featured_image_credit, @website.university %>
<% end %>
elements:
<% block.template.selected_pages.each do |element| %>
- title: >-
<%= prepare_text_for_static element.title %>
summary: >-
<%= prepare_text_for_static element.summary, 6 %>
path: "<%= element.path %>"
url: "<%= element.current_permalink_in_website(@website)&.path %>"
bodyclass: >-
<%= prepare_text_for_static element.bodyclass, 6 %>
<% if element.best_featured_image.attached? %>
image:
id: "<%= element.best_featured_image.id %>"
alt: >-
<%= prepare_text_for_static element.best_featured_image_alt, 7 %>
credit: >-
<%= prepare_html_for_static element.best_featured_image_credit, @website.university %>
<% end %>
<% end %>
......@@ -7,4 +7,35 @@
posts:
<% block.template.selected_posts.each do |post| %>
- "<%= post.static_path %>"
<% end %>
elements:
<% block.template.selected_posts.each do |element| %>
- title: >-
<%= prepare_text_for_static element.title %>
summary: >-
<%= prepare_text_for_static element.summary, 6 %>
path: "<%= element.path %>"
url: "<%= element.current_permalink_in_website(@website)&.path %>"
<% if element.best_featured_image.attached? %>
image:
id: "<%= element.best_featured_image.id %>"
alt: >-
<%= prepare_text_for_static element.best_featured_image_alt, 7 %>
credit: >-
<%= prepare_html_for_static element.best_featured_image_credit, @website.university %>
<% end %>
categories:
<% element.categories.each do |category| %>
- title: >-
<%= prepare_text_for_static category.name, 8 %>
path: "<%= category.path %>"
url: "<%= category.current_permalink_in_website(@website)&.path %>"
<% end %>
<% if element.author %>
author:
name: >-
<%= prepare_text_for_static element.author.name, 7 %>
path: "<%= element.author.slug %>"
url: "<%= element.author.current_permalink_in_website(@website)&.path %>"
<% end %>
<% end %>
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