- Install stack
- Stack is included in the haskell platform: https://www.haskell.org/platform/
- Stack 1.9.3 should work
- Install hakyll using stack:
stack install hakyll
- might require system packages
gmp-devel
orlibgmp-dev
to be installed for some dependencies to compile under linux
- might require system packages
- Build the Haskell executable:
stack build
- This should install the required ghc version as well as all required dependencies, as configure in the curry-lang-org.cabal and stack.yaml
- currently using stack resolver lts-14.15 which corresponds to ghc-8.6.5
- Build the site using the compiled executable:
stack exec site build
- This generates the site into the
_site
subdirectory
- This generates the site into the
- (Optional) Check for broken links:
stack exec site check
To view the website simply build the project and start the built-in hakyll web server at the root directory of this repository with the following command.
stack build
stack exec site watch
Now open the browser of your choice and navigate to localhost:8000.
When any changes outside of the Haskell code are saved, all dependent pages will be rebuild automatically and be seen in the browser after a refresh.
After changes to the Haskell code more manual intervention is necessary.
First stop the running stack exec site watch
invocation.
Then run the following commands.
stack build
stack exec site rebuild
stack exec site watch
It is also advisable to run stack exec site check
to check for broken links.
. project root
|
+ .gitignore
+ .gitlab-ci.yml YAML file containing the Gitlab CI/CD configuration
+ curry-lang-org.cabal the cabal project file
+ index.html contains index.html for /
+ README.md this readme document
+ site.hs the haskell source defining the routes and resource processing
+ stack.yaml the stack project file
|
+-- assets
| |
| +-- js contains .js files
| +-- css contains .css files
| +-- img contains images files
| +-- files contains other asset files
|
+-- downloads contains the index.html for /downloads
+-- imprint contains the index.md for /imprint
+-- data contains files not directly used as routes or templates
| |
| +-- learn_more contains the files that are used to generate the Features
| | | and Ecosystem sections on the landingpage
| | |
| | +-- *_desc.html one *_desc.html each defining the title
| | | and highlight color for each section
| | |
| | +-- ecosystem/features one folder containing the definitions for
| | the items of the corresponding section
| |
| +-- link_groups contains the definitions for the generated header/footer links
| | |
| | +-- footer contains a definition for each footer group
| | | and a folder each for the link definitions of that group
| | |
| | +-- header contains a definition for each header link
| |
| +-- syntax_definition contains the modified language definitions used by pandoc
| | |
| | +-- curry.xml modified version of the default kde curry language syntax definition
| | used for syntax highlighting
| |
| +-- versions contains one *_versions.html file
| | and folder for each table on the downloads page
| |
| +-- *_version.html description for a table on the downloads page
| +-- kics2/pakcs version entries for the download page for each table respectively
|
+-- privacy contains the index.md for /privacy
|
+-- templates contains various templates
| |
| +-- code contains emmbedded code as markdown templates
|
+-- test contains the source for experimental and test pages under /test
|
+-- tools contains the source for the pages under /tools
The sites routes and used files are specified as part of the haskell program defined in site.hs
.
The main function specifies the routes and route dependencies, it is separated from the remaining code by a line of dashes.
In the main function there is a match
expression for each set of identically processed resources.
stack exec site clean
can be used to clean the _site
and _cache
directory.
-
Headlines
-
replace
=
signes with markdown headline -
Main Headline underline with
=
or prefix with#
-
Other headlines should be at least h2 headlines with
##
prefix -
Code Examples
- add backtick fence
- decrease indentation
- annotate language for correct highlighting
- explicit
default
is different to no annotation
- explicit
- surround with lines containing only
___
-
External Link Rewrite Regex
- Find
\[\[\s*(\S*)\s*\|\s*(\S*)\s*\]\]
- Replace
[$2]($1)
- Find
-
Internal Links
- manual
- for links to wiki files (e.g. cass_longer.pdf) the file should be added to the assets and linked from there
- for links that should still point to the wiki
[title](link)
should be used
-
Images
-
manual
- for wiki image download image and add it to the assets then link from there
- for external images just link to the external image
-
Adding section
- Start (first) Section
<section> :::md:max-w-3xl
- Change Section
::: </section> <section> :::md:max-w-3xl
- End (last) Section
::: </section>
- Start (first) Section