mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 22:26:22 +00:00
Refactorizar DeployPrivate
This commit is contained in:
parent
27b4494333
commit
e49d8484a2
1 changed files with 20 additions and 1 deletions
|
@ -11,12 +11,31 @@ class DeployPrivate < DeployLocal
|
|||
jekyll_build
|
||||
end
|
||||
|
||||
# Hacer el deploy a un directorio privado
|
||||
# La URL del sitio dentro del panel.
|
||||
#
|
||||
# @return [String]
|
||||
def url
|
||||
Rails.application.routes.url_for(controller: :private, action: :show, site_id: site)
|
||||
end
|
||||
|
||||
# Hacer el deploy a un directorio privado.
|
||||
#
|
||||
# @return [String]
|
||||
def destination
|
||||
File.join(Rails.root, '_private', site.name)
|
||||
end
|
||||
|
||||
# El hostname no se usa para nada, porque el sitio es solo accesible a
|
||||
# través del panel de Sutty.
|
||||
#
|
||||
# @return [String]
|
||||
def default_hostname
|
||||
"#{site.name}.private.#{Site.domain}"
|
||||
end
|
||||
|
||||
# No usar recursos en compresión y habilitar los datos privados
|
||||
#
|
||||
# @return [Hash]
|
||||
def env
|
||||
@env ||= super.merge({
|
||||
'JEKYLL_ENV' => 'development',
|
||||
|
|
Loading…
Reference in a new issue