website source code for fractalide
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
content
data
test-data
themes
.gitignore
LICENSE
conf.nix
default.nix
live.sh
nixpkgs.nix Problem: old site not removed Apr 28, 2018
preview.sh Problem: Nowhere to add live data from the baker Nov 12, 2018
readme.md
site.nix

readme.md

Fractalide Website

Website for fractalide made with the styx static site generator.

Content management

The contents is managed in the data folder:

  • data/blocks: Holds the blocks data in nix format.
  • data/news: Holds news in nix, markdown or asciidoc format.
  • data/pages: Holds pages data.

News can be added by adding a content file in data/news Pages can be added by adding entries site.nix pages attribute. Blocks are more complex and requires to create templates.

Nix expressions can be used in markdown or asciidoc files, see documentation for details. Extensive example.

Configuration

conf.nix manage the site settings (Footer contents, javascript libraries, ...) The most important setting is siteUrl that is used for link generation. siteUrl should be set to the url of published site, without the trailing /.

Previewing

Run:

$ styx preview

And visit http://localhost:8080.

nix-build can be used to build the site as a normal nix derivation.

Debugging

nix-repl can be used for debugging, see documentation for details.

Deploying

styx deploy related commands can be used to quickly deploy to github pages.

  • styx deploy --init-gh-pages will prepare the repo for github pages deployment, this command should be run only once.
  • styx-deploy --gh-pages will copy the generated site to the gh-pages directory.
  • Then the gh-pages can be pushed by running (cd gh-pages && git push -u origin gh-pages) && git push -u origin gh-pages