mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 08:41:42 +00:00
fix: no cargar el sitio hasta que no se usen los posts
This commit is contained in:
parent
a265caad97
commit
d896a111b8
2 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue