aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.themes/classic/source/_includes/disqus.html8
-rw-r--r--Rakefile2
2 files changed, 5 insertions, 5 deletions
diff --git a/.themes/classic/source/_includes/disqus.html b/.themes/classic/source/_includes/disqus.html
index 4b913534..a58512b5 100644
--- a/.themes/classic/source/_includes/disqus.html
+++ b/.themes/classic/source/_includes/disqus.html
@@ -1,19 +1,19 @@
{% comment %} Load script if disquss comments are enabled and `page.comments` is either empty (index) or set to true {% endcomment %}
{% if site.disqus_short_name and page.comments != false %}
<script type="text/javascript">
- (function () {
+
var disqus_shortname = '{{ site.disqus_short_name }}';
{% if page.comments == true %}
{% comment %} `page.comments` can be only be set to true on pages/posts, so we embed the comments here. {% endcomment %}
// var disqus_developer = 1;
var disqus_identifier = '{{ site.url }}{{ page.url }}';
var disqus_url = '{{ site.url }}{{ page.url }}';
- var disqus_script = 'embed.js'
+ var disqus_script = 'embed.js';
{% else %}
{% comment %} As `page.comments` is empty, we must be on the index page. {% endcomment %}
- var disqus_script = 'count.js'
+ var disqus_script = 'count.js';
{% endif %}
-
+ (function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/' + disqus_script;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
diff --git a/Rakefile b/Rakefile
index c1594c7b..1206787e 100644
--- a/Rakefile
+++ b/Rakefile
@@ -283,7 +283,7 @@ desc "Set up _deploy folder and deploy branch for Github Pages deployment"
task :setup_github_pages do
repo_url = get_stdin("Enter the read/write url for your repository: ")
user = repo_url.match(/:([^\/]+)/)[1]
- branch = (repo_url.match(/\/\w+.github.com/).nil?) ? 'gh-pages' : 'master'
+ branch = (repo_url.match(/\/[\w-]+.github.com/).nil?) ? 'gh-pages' : 'master'
project = (branch == 'gh-pages') ? repo_url.match(/\/([^\.]+)/)[1] : ''
unless `git remote -v`.match(/origin.+?octopress.git/).nil?
# If octopress is still the origin remote (from cloning) rename it to octopress