This repository has been archived by the owner on Aug 5, 2020. It is now read-only.
/
pageflow.rb
78 lines (69 loc) · 3.28 KB
/
pageflow.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Register admins for pageflow models with active admin.
ActiveAdmin.application.load_paths.unshift(Dir[Pageflow::Engine.root.join('admins')])
Pageflow.configure do |config|
# The email address to use as from header in invitation mails to new
# users.
config.mailer_sender = 'info@scrollytelling.io'
# Page types available in the editor. Add futher page types from
# page type engines below.
config.page_types.register(Pageflow::BuiltInPageType.background_image)
config.page_types.register(Pageflow::BuiltInPageType.background_video)
config.page_types.register(Pageflow::BuiltInPageType.video)
config.page_types.register(Pageflow::BuiltInPageType.audio)
config.page_types.register(Pageflow::BuiltInPageType.audio_loop)
config.page_types.register(Pageflow::InternalLinks.grid_page_type)
config.page_types.register(Pageflow::BeforeAfter::PageType.new)
config.page_types.register(Pageflow::TextPage.page_type)
config.page_types.register(Pageflow::EmbeddedVideo.page_type)
# Add custom themes by invoking the pageflow:theme generator and
# registering the theme here.
#
# $ rails generate pageflow:theme my_custom_theme
# => creates app/assets/stylesheets/pageflow/themes/my_custom_theme.css.scss
#
config.themes.register(:default)
config.themes.register(:scrollytelling)
# String to interpolate into paths of files generated by paperclip
# preprocessors. This allows to refresh cdn caches after
# reprocessing attachments.
config.paperclip_attachments_version = 'v1'
# Path to the location in the filesystem where attachments shall
# be stored. The value of this option is available via the
# pageflow_filesystem_root paperclip interpolation.
config.paperclip_filesystem_root = 'tmp/attachments/production'
# Rewrite the below section to use your favorite configuration
# method: ENV variables, secrets.yml, custom yml files. If you use
# environment variables consider the dotenv gem to configure your
# application via a single .env file.
#
# Whatever you choose, do NOT hard code values below. That makes it
# hard to switch environments and risks leaking secrects.
# Default options for paperclip attachments which are supposed to
# use s3 storage. All options allowed in paperclip has_attached_file
# calls are allowed.
config.paperclip_s3_default_options.merge!(
:s3_credentials => {
:bucket => ENV['S3_BUCKET'],
:access_key_id => ENV['S3_ACCESS_KEY'],
:secret_access_key => ENV['S3_SECRET_KEY'],
:s3_host_name => ENV['S3_HOST_NAME']
},
:s3_host_alias => ENV['S3_HOST_ALIAS'],
:s3_protocol => ENV['S3_PROTOCOL']
)
# Default options for paperclip attachments which are supposed to
# use filesystem storage. All options allowed in paperclip has_attached_file
# calls are allowed.
config.zencoder_options.merge!(
:api_key => ENV['ZENCODER_API_KEY'],
:output_bucket => ENV['S3_OUTPUT_BUCKET'],
:s3_host_alias => ENV['S3_OUTPUT_HOST_ALIAS'],
:s3_protocol => ENV['S3_PROTOCOL'],
:attachments_version => 'v1'
)
end
# Comment out this call if you wish to run rails generators or rake
# tasks while the Pageflow configuration is in an invalid
# state. Otherwise Pageflow configuration errors might prevent you
# from initializing the environment. Required for Pageflow to run.
Pageflow.finalize!