Merge branch 'pr/89'
This commit is contained in:
commit
96512011a0
8 changed files with 121 additions and 20 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,3 +5,4 @@ ignore/
|
|||
generated/
|
||||
.curr
|
||||
.prev
|
||||
build/
|
||||
|
|
22
.travis.yml
Normal file
22
.travis.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
language: common-lisp
|
||||
sudo: false
|
||||
|
||||
env:
|
||||
global:
|
||||
- PATH=~/.roswell/bin:$PATH
|
||||
- ROSWELL_INSTALL_DIR=$HOME/.roswell
|
||||
matrix:
|
||||
- LISP=sbcl-bin
|
||||
- LISP=ccl-bin
|
||||
|
||||
install:
|
||||
- curl -L https://raw.githubusercontent.com/snmsts/roswell/release/scripts/install-for-ci.sh | sh
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.roswell
|
||||
- $HOME/.config/common-lisp
|
||||
|
||||
script:
|
||||
- ros -s prove -e "(ql:quickload '(coleslaw coleslaw-test))"
|
||||
-e '(or (prove:run :coleslaw-test) (uiop:quit -1))'
|
|
@ -1,5 +1,8 @@
|
|||
# coleslaw
|
||||
|
||||
[](https://travis-ci.org/kingcons/coleslaw)
|
||||
[](http://quickdocs.org/coleslaw/)
|
||||
|
||||
<img src="https://raw.github.com/redline6561/coleslaw/master/themes/hyde/css/logo_medium.jpg" alt="coleslaw logo" align="right"/>
|
||||
|
||||
> [Czeslaw Milosz](http://blog.redlinernotes.com/tag/milosz.html) was the writer-in-residence at UNC c. 1992.
|
||||
|
@ -23,7 +26,7 @@ Have questions? Come talk to us on IRC in **#coleslaw** on Freenode!
|
|||
* Sitemap generation
|
||||
* Incremental builds
|
||||
* Analytics via Google
|
||||
* Comments via [Disqus](http://disqus.com/)
|
||||
* Comments via [Disqus](http://disqus.com/) or [isso](http://posativ.org/isso)
|
||||
* Hosting via [Github Pages](https://pages.github.com/) or [Amazon S3](http://aws.amazon.com/s3/)
|
||||
* Embedding [gfycats](http://gfycat.com/)
|
||||
* [Tweeting](http://twitter.com/) about new posts
|
||||
|
|
22
coleslaw.asd
22
coleslaw.asd
|
@ -26,23 +26,19 @@
|
|||
(:file "indexes")
|
||||
(:file "feeds")
|
||||
(:file "coleslaw"))
|
||||
:in-order-to ((test-op (load-op coleslaw-tests)))
|
||||
:perform (test-op :after (op c)
|
||||
(funcall (intern "RUN!" :coleslaw-tests)
|
||||
(intern "COLESLAW-TESTS" :coleslaw-tests))))
|
||||
:in-order-to ((test-op (test-op coleslaw-test))))
|
||||
|
||||
(defsystem #:coleslaw-tests
|
||||
(defsystem #:coleslaw-test
|
||||
:description "A test suite for coleslaw."
|
||||
:license "BSD"
|
||||
:author "Brit Butler <redline6561@gmail.com>"
|
||||
:depends-on (coleslaw stefil)
|
||||
:pathname "tests/"
|
||||
:serial t
|
||||
:components ())
|
||||
|
||||
(defmethod operation-done-p ((op test-op)
|
||||
(c (eql (find-system :coleslaw))))
|
||||
(values nil))
|
||||
:depends-on (:coleslaw :prove)
|
||||
:defsystem-depends-on (:prove-asdf)
|
||||
:components ((:module "tests"
|
||||
:components
|
||||
((:test-file "tests"))))
|
||||
:perform (test-op :after (op c)
|
||||
(uiop:symbol-call :prove 'run c)))
|
||||
|
||||
(defpackage #:coleslaw-conf (:export #:*basedir*))
|
||||
(defparameter coleslaw-conf:*basedir*
|
||||
|
|
|
@ -341,6 +341,57 @@ Unfortunately, this does not solve:
|
|||
Content Types it includes or the CONTENT which indexes it appears
|
||||
on is not yet clear.
|
||||
|
||||
### Contributing
|
||||
|
||||
The preferred workflow is more or less:
|
||||
|
||||
- fork and clone
|
||||
- make a branch
|
||||
- commit your changes
|
||||
- push your branch to your github fork
|
||||
- open a Pull Request
|
||||
|
||||
#### Fork and clone
|
||||
|
||||
You may clone the main github repository or your fork, whichever you cloned
|
||||
will be known as origin in your git repository. You have to add the other git
|
||||
repository to your remotes, so if you cloned from your fork execute:
|
||||
|
||||
|
||||
```bash
|
||||
git remote add upstream git@github.com:redline6561/coleslaw.git
|
||||
```
|
||||
|
||||
If you cloned from the main github repository execute:
|
||||
|
||||
```bash
|
||||
git remote add fork git@github.com:<YourUsername>/coleslaw.git
|
||||
```
|
||||
|
||||
For the rest of the steps we will assume you cloned from your fork and that the main github repository has the remote name of upstream.
|
||||
|
||||
#### Make a branch
|
||||
|
||||
```bash
|
||||
git checkout -b <branch_name>
|
||||
```
|
||||
|
||||
It is important to work always on branch so one can track changes in upstream by simply executing ```git pull upstream master:master``` from the master branch. If one can't come up with a suitable branch name just name it patch-n.
|
||||
2
|
||||
#### Commit your changes
|
||||
|
||||
Make the changes you want to coleslaw, add the files with that changes (```git add <path/to/file>```) and commit them (```git commit```). Your commit message should strive to sum up what has changes and why.
|
||||
|
||||
#### Push your branch to your github fork
|
||||
|
||||
```bash
|
||||
git push origin branch
|
||||
```
|
||||
|
||||
#### Open a Pull Request
|
||||
|
||||
After pushing the branch to your fork, on github you should see a button to open a pull request. In the PR message give the rationale for your changes.
|
||||
|
||||
[closure_template]: https://github.com/archimag/cl-closure-template
|
||||
[api_docs]: https://github.com/redline6561/coleslaw/blob/master/docs/plugin-api.md
|
||||
[clmd]: https://github.com/gwkkwg/cl-markdown
|
||||
|
|
20
plugins/isso.lisp
Normal file
20
plugins/isso.lisp
Normal file
|
@ -0,0 +1,20 @@
|
|||
(defpackage :coleslaw-isso
|
||||
(:use :cl)
|
||||
(:export #:enable)
|
||||
(:import-from :coleslaw #:add-injection
|
||||
#:post))
|
||||
|
||||
(in-package :coleslaw-isso)
|
||||
|
||||
(defvar *isso-header*
|
||||
"<div class=\"comments\">
|
||||
<section id=\"isso-thread\"></section>
|
||||
<script data-isso=\"~a/\"
|
||||
src=\"~a/js/embed.min.js\"></script>
|
||||
</div>")
|
||||
|
||||
(defun enable (&key isso-url)
|
||||
(flet ((inject-p (x)
|
||||
(when (typep x 'post)
|
||||
(format nil *isso-header* isso-url))))
|
||||
(add-injection #'inject-p :body)))
|
|
@ -10,11 +10,6 @@
|
|||
|
||||
(in-package :coleslaw-s3)
|
||||
|
||||
(defparameter *credentials* nil
|
||||
"The credentials to authenticate with Amazon Web Services.
|
||||
Stored in a file with the access key on the first line
|
||||
and the secret key on the second.")
|
||||
|
||||
(defparameter *content-type-map* '(("html" . "text/html")
|
||||
("css" . "text/css")
|
||||
("png" . "image/png")
|
||||
|
@ -53,5 +48,7 @@ and the secret key on the second.")
|
|||
(zs3:delete-objects (stale-keys) *bucket*)))
|
||||
|
||||
(defun enable (&key auth-file bucket)
|
||||
(setf *credentials* (zs3:file-credentials auth-file)
|
||||
"AUTH-FILE: Path to file with the access key on the first line and the secret
|
||||
key on the second."
|
||||
(setf zs3:*credentials* (zs3:file-credentials auth-file)
|
||||
*bucket* bucket))
|
||||
|
|
11
tests/tests.lisp
Normal file
11
tests/tests.lisp
Normal file
|
@ -0,0 +1,11 @@
|
|||
(defpackage :coleslaw-tests
|
||||
(:use :cl :prove))
|
||||
|
||||
(in-package :coleslaw-tests)
|
||||
|
||||
(plan nil)
|
||||
|
||||
(deftest 1-is-a-number
|
||||
(is-type 1 'fixnum))
|
||||
|
||||
(finalize)
|
Loading…
Add table
Reference in a new issue