5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-06-30 19:36:07 +00:00

fix: no cargar el sitio hasta que no se usen los posts

This commit is contained in:
f 2022-12-30 10:55:10 -03:00
parent a265caad97
commit d896a111b8
2 changed files with 6 additions and 2 deletions

View file

@ -333,6 +333,10 @@ class Site < ApplicationRecord
status == 'building'
end
def jekyll?
File.directory? path
end
def jekyll
run_in_path do
@jekyll ||=
@ -432,7 +436,7 @@ class Site < ApplicationRecord
# Clona el esqueleto de Sutty para crear el sitio nuevo, no pasa nada
# si el sitio ya existe
def clone_skel!
return if File.directory? path
return if jekyll?
Rugged::Repository.clone_at ENV['SKEL_SUTTY'], path
end

View file

@ -14,7 +14,7 @@
%table.table.table-condensed
%tbody
- @sites.each do |site|
- next unless site.jekyll
- next unless site.jekyll?
- rol = current_usuarie.rol_for_site(site)
-#
TODO: Solo les usuaries cachean porque tenemos que separar