Page Menu
Home
ClusterLabs Projects
Search
Configure Global Search
Log In
Files
F4832532
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/README.md b/README.md
index 52c047b..16277b6 100644
--- a/README.md
+++ b/README.md
@@ -1,50 +1,54 @@
# ClusterLabs.org website
## Installing Jekyll
ClusterLabs,org is partially generated by jekyll. Installing jekyll requires
the following dependencies:
* nodejs
* npm
* ruby
* ruby-devel
* rubygems
* rubygem-bundler
* rubygem-rdiscount
Once you have those, change to the +src+ directory and run `bundle install`.
## Using Jekyll
ClusterLabs.org's jekyll source is under the src directory. Jekyll will
generate static content to the html directory.
To generate content in a checkout for development and testing, change to the
+src+ directory and run `bundle exec jekyll build` (to merely generate content)
or `bundle exec jekyll serve` (to generate and test via a local server).
To generate content on the production site, run
`JEKYLL_ENV=production jekyll build` (which will enable such things as site
analytics and asset digests).
If +src/Gemfile+ changes, re-run `bundle install` afterward.
## Images, stylesheets and JavaScripts
We use the jekyll-assets plugin to manage "assets" such as images, stylesheets,
and JavaScript. One advantage is that digest hashes are automatically added to
the generated filenames when in production mode. This allows "cache busting"
when an asset changes, so we can use long cache times on the server end.
+Another advantage is that sources are minified when in production mode.
How CSS is managed:
* +src/\_assets/css/main.scss+ is just a list of imports
* +src/\_assets/css/\_\*.scss+ contain the CSS to be imported by main.scss
* jekyll will generate html/assets/main.css (or main-_HASH_.css) as the
combination of all imports
* web pages can reference the stylesheet via +{% css main %}+
-JavaScript is not managed this way yet, but will be:
-* +src/\_assets/js/\*.js+ are the JavaScript source
+JavaScript is managed similarly:
+* +src/\_assets/js/main.js+ is just a list of requires
+* +src/\_assets/js/\*.js+ contain the JavaScript to be required by main.js
* jekyll will copy these to html/assets
-* web pages can reference them via +{% js _BASENAME_ %}+
+* jekyll will generate html/assets/main.js (or main-_HASH_.js) as the
+ combination of all JavaScript
+* web pages can reference the script via +{% js main %}+
-Images are also not managed this way yet, but will be.
+Images are not managed this way yet, but will be.
diff --git a/src/_assets/js/main.js b/src/_assets/js/main.js
new file mode 100644
index 0000000..8c3055f
--- /dev/null
+++ b/src/_assets/js/main.js
@@ -0,0 +1,4 @@
+#= require vendor/modernizr-2.6.2.min
+#= require vendor/jquery-1.8.2.min
+#= require plugins
+#= require retina.min
diff --git a/src/js/plugins.js b/src/_assets/js/plugins.js
similarity index 100%
rename from src/js/plugins.js
rename to src/_assets/js/plugins.js
diff --git a/src/js/retina.min.js b/src/_assets/js/retina.min.js
similarity index 100%
rename from src/js/retina.min.js
rename to src/_assets/js/retina.min.js
diff --git a/src/js/vendor/jquery-1.8.2.min.js b/src/_assets/js/vendor/jquery-1.8.2.min.js
similarity index 100%
rename from src/js/vendor/jquery-1.8.2.min.js
rename to src/_assets/js/vendor/jquery-1.8.2.min.js
diff --git a/src/js/vendor/modernizr-2.6.2.min.js b/src/_assets/js/vendor/modernizr-2.6.2.min.js
similarity index 100%
rename from src/js/vendor/modernizr-2.6.2.min.js
rename to src/_assets/js/vendor/modernizr-2.6.2.min.js
diff --git a/src/_includes/head.html b/src/_includes/head.html
index b01c498..c94da16 100644
--- a/src/_includes/head.html
+++ b/src/_includes/head.html
@@ -1,22 +1,16 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<link href='http://fonts.googleapis.com/css?family=Open+Sans|Oxygen+Mono|Marvel:700' rel='stylesheet' type='text/css'>
- {% css main %}
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
-
- <script type="text/javascript" src="{{ "/js/vendor/modernizr-2.6.2.min.js" | relative_url }}"></script>
- <!--script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
- <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.8.2.min.js"><\/script>')</script-->
- <script type="text/javascript" src="{{ site.time | date: '/js/plugins.js?v=%Y%m%d' | relative_url }}"></script>
- <script type="text/javascript" src="{{ site.time | date: '/js/main.js?v=%Y%m%d' | relative_url }}"></script>
- <script type="text/javascript" src="{{ site.time | date: '/js/retina.min.js?v=%Y%m%d' | relative_url }}"></script>
+ {% css main %}
+ {% js main %}
{% if jekyll.environment == "production" and site.google_analytics %}
{% include google-analytics.html %}
{% endif %}
</head>
diff --git a/src/js/main.js b/src/js/main.js
deleted file mode 100644
index 8b13789..0000000
--- a/src/js/main.js
+++ /dev/null
@@ -1 +0,0 @@
-
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jul 20, 7:40 PM (6 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2081351
Default Alt Text
(5 KB)
Attached To
Mode
rW ClusterLabs-www
Attached
Detach File
Event Timeline
Log In to Comment