From b11e6f912028d955c6e0e0bef7c93078faa9ea85 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Mon, 29 Sep 2014 03:39:44 -0700 Subject: [PATCH] build github.io webpage from README.md --- Gruntfile.coffee | 22 +++++++++++++++++++++- README.md | 6 ++++-- package.json | 3 ++- template.jst | 12 ++++++++++++ 4 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 template.jst diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 6bcbef9b8..201c55a6d 100755 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -146,13 +146,21 @@ module.exports = (grunt) -> git tag -af stable -m "<%= pkg.meta.name %> v<%= pkg.meta.version %>." git checkout -b tmp git merge --no-commit -s ours gh-pages - git checkout gh-pages "builds/*<%= pkg.meta.suffix.beta %>.*" + git checkout gh-pages "builds/*<%= pkg.meta.suffix.beta %>.*" README.md index.html git commit -am "Move <%= pkg.meta.name %> v<%= pkg.meta.version %> to stable channel." git checkout gh-pages git merge --ff-only tmp git branch -d tmp git checkout @{-2} """.split('\n').join('&&') + web: + command: """ + git commit -am "Build web page." + git checkout gh-pages + git checkout - README.md index.html + git commit -am "Update web page." + git checkout - + """.split('\n').join('&&') push: command: 'git push origin --tags -f && git push origin --all' @@ -194,6 +202,13 @@ module.exports = (grunt) -> 'testbuilds/<%= pkg.name %><%= pkg.meta.suffix.dev %>.meta.js' ] + markdown: + web: + src: 'README.md' + dest: 'index.html' + options: + template: 'template.jst' + require('load-grunt-tasks') grunt grunt.registerTask 'default', [ @@ -289,6 +304,11 @@ module.exports = (grunt) -> 'shell:stable' ] + grunt.registerTask 'web', [ + 'markdown:web' + 'shell:web' + ] + grunt.registerTask 'push', [ 'shell:push' ] diff --git a/README.md b/README.md index e3c04ec8f..b2634cb47 100755 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +# 4chan X Adds various features to 4chan. A continuation of the fork formerly maintained by [Seaweed](https://github.com/seaweedchan/4chan-x) and subsequently [Spittie](https://github.com/Spittie/4chan-x). @@ -11,7 +12,7 @@ Install [Greasemonkey](https://addons.mozilla.org/en-US/firefox/addon/greasemonk Greasemonkey 2.1 also fixed [another bug](https://github.com/greasemonkey/greasemonkey/issues/1937) that can break posting of images from URLs and downloading images with the original filename. -### Known issues +### Known issues The combination of Firefox 29 and Greasemonkey 2.0+ causes 4chan X not to work. If you have this problem, you should [upgrade Firefox](http://www.mozilla.org/en-US/firefox/new/) to version 30 or higher. Alternatively, you can downgrade to [Greasemonkey 1.15](https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/versions/#version-1.15) and turn off automatic updates for Greasemonkey ([see pic](https://raw.githubusercontent.com/ccd0/4chan-x/master/img/2014-07-12_16-19-32.png)). @@ -24,7 +25,7 @@ This should also work for non-Windows/dev/canary Chrome and Chromium-based versi The stable and beta releases of Chrome on Windows will disable extensions not installed from the Chrome store, so users will need to install 4chan X from the link above. Only the latest stable version of 4chan X is available. -### Known issues +### Known issues Some recent versions of Chromium/Chrome (38.0.2085 - 38.0.2103) (and versions of Opera based on them) suffer from a (now fixed) [bug](https://crbug.com/393686) that prevents extensions from making HTTP requests if more than one extension is enabled. This breaks, among other things, thread updating, quick reply, and, when `JSON Navigation` is enabled, the thread index. If you are experiencing this, try using another version of Chromium/Chrome/Opera, disabling your other extensions, or using a different browser. ## Other browsers @@ -46,6 +47,7 @@ New features and non-urgent bugfixes are released on the beta channel for furthe If you want to install the current beta version but get updates from the stable channel after that, install it from [here](https://github.com/ccd0/4chan-x/raw/beta/builds/4chan-X.user.js) for Firefox or [here](https://github.com/ccd0/4chan-x/raw/beta/builds/4chan-X.crx) for Chromium. ## More information +### [Source Code](https://github.com/ccd0/4chan-x) ### [Frequently Asked Questions](https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions) ### [Reporting Bugs and Contributing](https://github.com/ccd0/4chan-x/blob/master/CONTRIBUTING.md) diff --git a/package.json b/package.json index 766aaac13..87e101d29 100755 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "grunt-contrib-copy": "0.6.0", "grunt-contrib-watch": "0.6.1", "grunt-crx": "0.3.3", + "grunt-markdown": "0.6.1", "grunt-shell": "1.1.1", "load-grunt-tasks": "0.6.0" }, @@ -65,4 +66,4 @@ "engines": { "node": ">=0.10" } -} \ No newline at end of file +} diff --git a/template.jst b/template.jst new file mode 100644 index 000000000..9e6e8ea5a --- /dev/null +++ b/template.jst @@ -0,0 +1,12 @@ + + +4chan X + + +<%=content%> + +