jekyll-attendease 0.5.5 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/jekyll-attendease.rb +9 -705
- data/lib/jekyll/attendease_plugin.rb +19 -0
- data/lib/jekyll/attendease_plugin/event_data_generator.rb +154 -0
- data/lib/jekyll/attendease_plugin/event_layout_generator.rb +43 -0
- data/lib/jekyll/attendease_plugin/filters.rb +9 -0
- data/lib/jekyll/attendease_plugin/pre_zero_point_six_link_redirect_generator.rb +35 -0
- data/lib/jekyll/attendease_plugin/presenter_page.rb +31 -0
- data/lib/jekyll/attendease_plugin/presenters_index_page.rb +23 -0
- data/lib/jekyll/attendease_plugin/redirect_page.rb +22 -0
- data/lib/jekyll/attendease_plugin/schedule_day_page.rb +38 -0
- data/lib/jekyll/attendease_plugin/schedule_generator.rb +156 -0
- data/lib/jekyll/attendease_plugin/schedule_index_page.rb +23 -0
- data/lib/jekyll/attendease_plugin/schedule_session_page.rb +24 -0
- data/lib/jekyll/attendease_plugin/schedule_sessions_page.rb +26 -0
- data/lib/jekyll/attendease_plugin/sponsor_generator.rb +37 -0
- data/lib/jekyll/attendease_plugin/sponsors_index_page.rb +23 -0
- data/lib/jekyll/attendease_plugin/tags.rb +65 -0
- data/lib/jekyll/attendease_plugin/venue_page.rb +24 -0
- data/lib/jekyll/attendease_plugin/venues_index_page.rb +23 -0
- data/lib/jekyll/attendease_plugin/version.rb +6 -0
- data/spec/lib/jekyll/attendease_plugin/event_data_generator_spec.rb +16 -0
- data/spec/lib/jekyll/attendease_plugin/event_layout_generator_spec.rb +12 -0
- data/spec/lib/jekyll/attendease_plugin/filters_spec.rb +15 -0
- data/spec/lib/jekyll/attendease_plugin/pre_zero_point_six_link_redirect_generator_spec.rb +40 -0
- data/spec/lib/jekyll/attendease_plugin/schedule_generator_spec.rb +104 -0
- data/spec/lib/jekyll/attendease_plugin/sponsor_generator_spec.rb +12 -0
- data/spec/lib/jekyll/attendease_plugin/tags_spec.rb +45 -0
- data/spec/spec_helper.rb +83 -0
- data/spec/support/fixtures_helpers.rb +7 -0
- data/templates/_includes/attendease/presenters/index.html +2 -2
- data/templates/_includes/attendease/presenters/presenter.html +3 -3
- data/templates/_includes/attendease/redirect.html +12 -0
- data/templates/_includes/attendease/schedule/day.html +5 -5
- data/templates/_includes/attendease/schedule/index.html +3 -3
- data/templates/_includes/attendease/schedule/session.html +3 -3
- data/templates/_includes/attendease/schedule/sessions.html +3 -3
- data/templates/_includes/attendease/sponsors/index.html +14 -3
- data/templates/layout.html +1 -1
- metadata +113 -20
- data/README.md +0 -181
data/README.md
DELETED
@@ -1,181 +0,0 @@
|
|
1
|
-
# Jekyll::Attendease
|
2
|
-
|
3
|
-
A Jekyll plugin, brings in data from your Attendease event and allows you to use it in your Jekyll templates for awesome event websites.
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
Add this line to your application's Gemfile:
|
8
|
-
|
9
|
-
gem 'jekyll-attendease'
|
10
|
-
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle
|
14
|
-
|
15
|
-
Or install it yourself as:
|
16
|
-
|
17
|
-
$ gem install jekyll-attendease
|
18
|
-
|
19
|
-
|
20
|
-
Next, make sure to require it. Add the following file `_plugins/attendease.rb` and content:
|
21
|
-
|
22
|
-
``` ruby
|
23
|
-
require "jekyll-attendease"
|
24
|
-
```
|
25
|
-
|
26
|
-
## Configuration
|
27
|
-
|
28
|
-
You will need to configure by editing your `_config.yml`:
|
29
|
-
|
30
|
-
``` yaml
|
31
|
-
#
|
32
|
-
# Plugin: jekyll-attendease
|
33
|
-
#
|
34
|
-
attendease:
|
35
|
-
# Required
|
36
|
-
api_host: https://your-event-subdomain.attendease.com/
|
37
|
-
|
38
|
-
# Optional
|
39
|
-
access_token: secret_access_token_for_access_to_private_events # Delete this if you don't have one or need one.
|
40
|
-
cache_expiry: 3600 # The number of seconds until we regerenate the data from the api. Otherwise data will be cached for speed.
|
41
|
-
generate_schedule_pages: false # Set to true if you want to generate static schedule pages.
|
42
|
-
schedule_path_name: 'schedule' # Set to the path your want your schedule pages to live at.
|
43
|
-
show_day_index: false # Set to true if you want an index of days
|
44
|
-
presenters_path_name: 'presenters' # folder off of the root to put the presenters page
|
45
|
-
venues_path_name: 'venues' # folder off of the root to put the venues page
|
46
|
-
sponsors_path_name: 'sponsors' # folder off of the root to put the sponsors page
|
47
|
-
|
48
|
-
schedule_sessions_title: 'Schedule: Sessions' # Override to set the page.title of the sessions listing page
|
49
|
-
schedule_session_page_title: 'Schedule: %s' # %s will be substituted with the session's name
|
50
|
-
|
51
|
-
presenters_index_title: 'Presenters' # Override to set the page.title of the presenters listing page
|
52
|
-
presenter_page_title: 'Presenter: %s' # %s will be substituted with the session's name
|
53
|
-
|
54
|
-
venues_index_title: 'Venues' # Override to set the page.title property of the Venues index page
|
55
|
-
venue_page_title: 'Venue: %s' # %s will be substituted with venue's name. Override to set the page.title property of the individual Venue page
|
56
|
-
```
|
57
|
-
|
58
|
-
Remember to replace `https://your-event-subdomain.attendease.com/` with your actual event url, or crazy things will happen!
|
59
|
-
|
60
|
-
## Usage
|
61
|
-
|
62
|
-
Now the event name can easily be used in your site like so:
|
63
|
-
|
64
|
-
`{{ site.attendease.data.attendease_event_name }}`
|
65
|
-
|
66
|
-
We can also use logical expressions like so:
|
67
|
-
|
68
|
-
```
|
69
|
-
{% if site.attendease.data.attendease_has_registration %}
|
70
|
-
We have registration!
|
71
|
-
{% endif %}
|
72
|
-
```
|
73
|
-
|
74
|
-
## Magic Attendease Tags
|
75
|
-
|
76
|
-
Simply add the auth script tag and the auth action and account tags and our system will know if you logged in or out and will be able to link to your account!
|
77
|
-
|
78
|
-
The script tag sets up an AJAX callback to the server to determine if we are online or offline.
|
79
|
-
`{% attendease_auth_script %}`
|
80
|
-
|
81
|
-
This is simple a div with the id `attendease-auth-account`, maybe more in the future. When used with the `attendease_auth_script` tag it will populate with the link to the account of the attendee.
|
82
|
-
|
83
|
-
`{% attendease_auth_account %}`
|
84
|
-
|
85
|
-
This is simple a div with the id `attendease-auth-action`, maybe more in the future. When used with the `attendease_auth_script` tag it will populate with a `login` or `logout` action.
|
86
|
-
|
87
|
-
`{% attendease_auth_action %}`
|
88
|
-
|
89
|
-
This script tag sets up AJAX actions for scheduling sessions.
|
90
|
-
|
91
|
-
`{% attendease_scheduler_script %}`
|
92
|
-
|
93
|
-
This script tag sets up lingo so your event can sound like you want it to sound like.
|
94
|
-
|
95
|
-
`{% attendease_locales_script %}`
|
96
|
-
|
97
|
-
A quick way to use our lingo stuff in our jekyll templates.
|
98
|
-
|
99
|
-
`{% t %}`
|
100
|
-
|
101
|
-
## Listening for the auth callback
|
102
|
-
|
103
|
-
In your site's Javascript, do something like this:
|
104
|
-
|
105
|
-
``` javascript
|
106
|
-
JekyllAttendease.onLoginCheck(function(e)
|
107
|
-
{
|
108
|
-
if (e.data.loggedin)
|
109
|
-
{
|
110
|
-
// do some cool stuff!
|
111
|
-
var account = e.data.account;
|
112
|
-
// console.log(account);
|
113
|
-
}
|
114
|
-
|
115
|
-
// And we have some URLs for you!
|
116
|
-
// e.data.loginURL
|
117
|
-
// e.data.logoutURL
|
118
|
-
// e.data.accountURL
|
119
|
-
});
|
120
|
-
```
|
121
|
-
|
122
|
-
|
123
|
-
## Static Schedule Pages
|
124
|
-
|
125
|
-
In your `_config.yml` if you add the `generate_schedule_pages` set to `true` under `attendease` it will generate static schedule pages from the Attendease public API.
|
126
|
-
|
127
|
-
You can customize the look/structure of each page as well as widgets within the pages. These pages will be automatically generated for you when you build your site.
|
128
|
-
|
129
|
-
For Session Day pages:
|
130
|
-
|
131
|
-
- `_layouts/attendease_schedule_day_sessions.html` - The layout for the generate session day page. It will list all instances on that day
|
132
|
-
- `_includes/attendease/session_instance_item.html` - The instance item on the page
|
133
|
-
- `_includes/attendease/filter.html` - A filter and its items in the instance
|
134
|
-
- `_includes/attendease/presenter_item.html` - A presenter item in the instance
|
135
|
-
|
136
|
-
## Contributing
|
137
|
-
|
138
|
-
1. Fork it
|
139
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
140
|
-
3. Commit your changes (`git commit -am 'Added some feature'`)
|
141
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
142
|
-
5. Create new Pull Request
|
143
|
-
|
144
|
-
## Updating the gem on beta and production
|
145
|
-
|
146
|
-
1. log into the jail as root
|
147
|
-
2. gem install jekyll-attendease -v x.x.x
|
148
|
-
|
149
|
-
## Testing
|
150
|
-
|
151
|
-
During development, you can create and install local builds:
|
152
|
-
|
153
|
-
`gem build jekyll-attendease.gemspec`
|
154
|
-
|
155
|
-
And then install it:
|
156
|
-
|
157
|
-
gem install jekyll-attendease-`cat jekyll-attendease.gemspec|grep s.version|awk '{print $3}'|sed s/\'//g`.gem
|
158
|
-
|
159
|
-
## License
|
160
|
-
|
161
|
-
Copyright (C) 2013 Attendease (https://attendease.com/)
|
162
|
-
|
163
|
-
The MIT License
|
164
|
-
|
165
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
166
|
-
this software and associated documentation files (the “Software”), to deal in
|
167
|
-
the Software without restriction, including without limitation the rights to
|
168
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
169
|
-
of the Software, and to permit persons to whom the Software is furnished to do
|
170
|
-
so, subject to the following conditions:
|
171
|
-
|
172
|
-
The above copyright notice and this permission notice shall be included in all
|
173
|
-
copies or substantial portions of the Software.
|
174
|
-
|
175
|
-
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
176
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
177
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
178
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
179
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
180
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
181
|
-
SOFTWARE.
|