Skip to content

Commit

Permalink
Merge pull request #11 from surabax/server-stop
Browse files Browse the repository at this point in the history
Export "stop" function and fix a typo in the documentation.
  • Loading branch information
svetlyak40wt authored Oct 29, 2024
2 parents 10c4ec1 + 5126437 commit 62c4686
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
3 changes: 3 additions & 0 deletions docs/changelog.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"ASDF"
"REPL"
"HTTP"))
(0.3.1 2024-10-29
"* `stop` function was exported.
* A typo was fixed in the documentation.")
(0.3.0 2024-05-27
"* Field `url` was added to `content` objects of type `post` and `page`. It contains a full URL of the page and can be used as `canonical` URL in templates.")
(0.2.0 2024-05-26
Expand Down
2 changes: 1 addition & 1 deletion docs/index.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Of course, we could look at static site generators in other programming language
* Supports different themes.
* Multiple templating engines might be used.
* Many content formats are supported. Markdown is used by default, but you can easily use reStructured text, Spinneret or add your own.
* Plugins and themse can be hosted along with the content of your site.
* Plugins and themes can be hosted along with the content of your site.
See also the STATICL-DOCS/ROADMAP::@ROADMAP section.
")
Expand Down
13 changes: 13 additions & 0 deletions docs/making-a-static-site.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,14 @@ CL-USER> (staticl:serve :root-dir #P"/tmp/my-site"
Starting Clack server to serve site from /tmp/result/
Hunchentoot server is started.
Listening on localhost:8001.
#S(CLACK.HANDLER::HANDLER
:SERVER :HUNCHENTOOT
:SWANK-PORT NIL
:ACCEPTOR #<BT2:THREAD "clack-handler-hunchentoot" {100480FF43}>)
```
It will return a web server handler.
Or from the command line:
```bash
Expand All @@ -182,6 +188,13 @@ If you click on one of the posts, it will open in its entirety:
Pay attention to the "Next" link in the lower right corner. All blog posts are linked to each other and this is also done thanks to a separate pipeline block: `(prev-next-links)'. This pipeline block adds metadata to each post, which is then available in the template. If you remove it, the links will disappear from the pages.
To stop your server, use the following command in REPL:
```lisp
CL-USER> (staticl:stop)
; No values
```
## How to add comments using Disqus
Expand Down
6 changes: 4 additions & 2 deletions src/core.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
(:import-from #:staticl/builder
#:generate)
(:import-from #:staticl/server
#:serve)
#:serve
#:stop)
(:export #:generate
#:new-site
#:serve))
#:serve
#:stop))
(in-package #:staticl)


3 changes: 2 additions & 1 deletion src/server.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
(:import-from #:staticl/plugins/autoreload
#:autoreload)
(:export
#:serve))
#:serve
#:stop))
(in-package #:staticl/server)

(defvar *port* nil)
Expand Down

0 comments on commit 62c4686

Please sign in to comment.