-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/47' into develop
#47 is not yet fully finished, but it's sufficiently advanced to be snapshotted into the `develop` branch.
- Loading branch information
Showing
24 changed files
with
895 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
Smeagol's core configuration comes from a configuration file, `config.edn`, which may be overridden by [[Environment Variables]]. The default file is at `resources/config.edn`; this default can be overridden by providing an environment variable, `SMEAGOL_CONFIG`, whose value is the full or relative pathname of a suitable file. | ||
|
||
|
||
The default configuration file is as follows: | ||
|
||
``` | ||
{ | ||
:content-dir "resources/public/content" | ||
;; where content is served from. | ||
:default-locale "en-GB" ;; default language used for messages | ||
:formatters ;; formatters for processing markdown | ||
;; extensions. | ||
{"vega" smeagol.formatting/process-vega | ||
"vis" smeagol.formatting/process-vega | ||
"mermaid" smeagol.extensions.mermaid/process-mermaid | ||
"backticks" smeagol.formatting/process-backticks | ||
"pswp" smeagol.formatting/process-photoswipe} | ||
:log-level :info ;; the minimum logging level; one of | ||
;; :trace :debug :info :warn :error :fatal | ||
:js-from :cdnjs ;; where to load JavaScript libraries | ||
;; from: options are :local, :cdnjs | ||
:passwd "resources/passwd" | ||
;; where the password file is stored | ||
:site-title "Smeagol" ;; overall title of the site, used in | ||
;; page headings | ||
:start-page "Introduction" ;; the page shown to a visitor to the | ||
;; root URL. | ||
:thumbnails {:small 64 ;; maximum dimension of thumbnails | ||
;; stored in the /small directory | ||
:med 400 ;; maximum dimension of thumbnails | ||
;; stored in the /med directory | ||
}} | ||
``` | ||
|
||
|
||
## content-dir | ||
|
||
The value of `content-dir` should be the full or relative path to the content to be served: the Markdown files, and the upload directories. Full paths are advised, where possible. The directory must be readable and writable by the process running Smeagol. The default is `resources/public/conten` | ||
|
||
|
||
The value from the configuration file may be overridden with the value of the environment variable `SMEAGOL_CONTENT_DIR`. | ||
|
||
|
||
## default-locale | ||
|
||
The locale which you expect the majority of your visitors will use. Content negotiation will be done of course, and the best internationalisation file available will be used, but this sets a default for users who do not have any acceptable locale known to us. The default value is `en-GB`. | ||
|
||
|
||
This parameter may be overridden with the environment variable `SMEAGOL-DEFAULT-LOCALE`. | ||
|
||
|
||
## formatters | ||
|
||
Specifications for formatters for markup extensions. The exact data stored will change before Smeagol 1.1.0. TODO: update this. | ||
|
||
|
||
## log-level | ||
|
||
The level at which logging should operate. Each setting implies all of the settings more severe than itself so | ||
|
||
|
||
1. setting `:debug` will log all of `debug, info, warn, error` and| `fatal` messages; | ||
|
||
2. setting `:info` will log all of `info, warn, error` and| `fatal` messages; | ||
|
||
|
||
and so on, so that setting `:fatal` will show only messages which report reasons for Smeagol to fail. | ||
|
||
|
||
The default setting is `:info`. | ||
|
||
|
||
This parameter may be overridden with the environment variable `SMEAGOL-LOG-LEVEL`. | ||
|
||
## TODO: Complete this doumentation! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
## How this works | ||
|
||
The specification for this gallery is as follows: | ||
|
||
``` | ||
{ | ||
slides: [ | ||
{ src: 'content/uploads/g1.jpg', w: 2592, h:1944, | ||
title: 'Frost on a gate, Laurieston' }, | ||
{ src: 'content/uploads/g2.jpg', w: 2560, h:1920, | ||
title: 'Feathered crystals on snow surface, Taliesin' }, | ||
{ src: 'content/uploads/g3.jpg', w: 2560, h:1920, | ||
title: 'Feathered snow on log, Taliesin' }, | ||
{ src: 'content/uploads/g4.jpg', w: 2560, h:1920, | ||
title: 'Crystaline growth on seed head, Taliesin' }], | ||
options: { | ||
timeToIdle: 100 | ||
}, | ||
openImmediately: true | ||
} | ||
``` | ||
|
||
The format of the specification is [JSON](https://www.json.org/json-en.html); there are (at present) three keys, as follows | ||
|
||
### slides | ||
|
||
Most be present. The value of `slides` is a list delimited by square brackets of slide objects. For more information, see the [authoritative documentation](https://photoswipe.com/documentation/getting-started.html) under the sub heading **'Creating an Array of Slide Objects'**. | ||
|
||
### options | ||
|
||
Optional. The value of `options` is a JSON object [as documented here](https://photoswipe.com/documentation/options.html). | ||
|
||
### openImmediately | ||
|
||
Optional. If the value of `openImmediately` is `true`, the gallery will open immediately, covering the whole page. If false, only a button with the label 'Open the gallery' will be shown. Selecting this button will cause the gallery to open. | ||
|
||
## The Gallery | ||
|
||
This page holds an example Photoswipe gallery. | ||
|
||
```pswp | ||
{ | ||
slides: [ | ||
{ src: 'content/uploads/g1.jpg', w: 2592, h:1944, | ||
title: 'Frost on a gate, Laurieston' }, | ||
{ src: 'content/uploads/g2.jpg', w: 2560, h:1920, | ||
title: 'Feathered crystals on snow surface, Taliesin' }, | ||
{ src: 'content/uploads/g3.jpg', w: 2560, h:1920, | ||
title: 'Feathered snow on log, Taliesin' }, | ||
{ src: 'content/uploads/g4.jpg', w: 2560, h:1920, | ||
title: 'Crystaline growth on seed head, Taliesin' }], | ||
options: { | ||
timeToIdle: 100 | ||
}, | ||
openImmediately: true | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## How this works | ||
|
||
The specification for this gallery is as follows: | ||
|
||
``` | ||
![Frost on a gate, Laurieston](content/uploads/g1.jpg) | ||
![Feathered crystals on snow surface, Taliesin](content/uploads/g2.jpg) | ||
![Feathered snow on log, Taliesin](content/uploads/g3.jpg) | ||
![Crystaline growth on seed head, Taliesin](content/uploads/g4.jpg) | ||
``` | ||
|
||
That's all there is to it - a sequence of image links just as you'd write them anywhere else in the wiki. | ||
|
||
## The Gallery | ||
|
||
This page holds another example Photoswipe gallery, this time using a simpler, Markdown-based specification. Processing this specification takes more work than the full syntax used in the other [Example gallery], so the gallery may be slower to load; but it's much easier to configure. | ||
|
||
```pswp | ||
![Frost on a gate, Laurieston](content/uploads/g1.jpg) | ||
![Feathered crystals on snow surface, Taliesin](content/uploads/g2.jpg) | ||
![Feathered snow on log, Taliesin](content/uploads/g3.jpg) | ||
![Crystaline growth on seed head, Taliesin](content/uploads/g4.jpg) | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
classDiagram | ||
Class01 <|-- AveryLongClass : Cool | ||
Class03 *-- Class04 | ||
Class05 o-- Class06 | ||
Class07 .. Class08 | ||
Class09 --> C2 : Where am i? | ||
Class09 --* C3 | ||
Class09 --|> Class07 | ||
Class07 : equals() | ||
Class07 : Object[] elementData | ||
Class01 : size() | ||
Class01 : int chimp | ||
Class01 : int gorilla | ||
Class08 <--> C2: Cool label |
Oops, something went wrong.