From 89e4189a9716a97f5f13918543bf59c34bdcf6bc Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Thu, 10 Aug 2023 11:23:17 -0500 Subject: [PATCH 1/5] build: Add devcontainer Borrowed from https://github.com/BioJulia/BioJuliaDocs/commit/2703d8f13877772ddf95b9164377ff68074d1370 - Decided to use release instead of LTS for some speed. - Also added a postStartCommand to launch the site --- .devcontainer/devcontainer.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..f679f86 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,18 @@ +{ + "features": { + "ghcr.io/julialang/devcontainer-features/julia:1": { + "channel": "release" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "julialang.language-julia", + "tamasfe.even-better-toml", + "eamodio.gitlens" + ] + } + }, + "onCreateCommand": "julia --project=biojulia.github.io -e 'using Pkg; Pkg.instantiate(); Pkg.precompile();'", + "postStartCommand": "julia --project=biojulia.github.io -e 'using Xranklin; Xranklin.serve();'" +} From 7338b824303ddc0353ba899679b9131bab53eba9 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Thu, 10 Aug 2023 11:44:36 -0500 Subject: [PATCH 2/5] build: Add name and image to devcontainer --- .devcontainer/devcontainer.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f679f86..0898e8a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,4 +1,6 @@ { + "name": "biojulia.github.io", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { "ghcr.io/julialang/devcontainer-features/julia:1": { "channel": "release" From a6d84a8bbd3baabae5954e70103bf2540152c444 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Thu, 10 Aug 2023 12:09:26 -0500 Subject: [PATCH 3/5] build: Fix project path --- .devcontainer/devcontainer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 0898e8a..815d20b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,6 +15,6 @@ ] } }, - "onCreateCommand": "julia --project=biojulia.github.io -e 'using Pkg; Pkg.instantiate(); Pkg.precompile();'", - "postStartCommand": "julia --project=biojulia.github.io -e 'using Xranklin; Xranklin.serve();'" + "postCreateCommand": "julia --project=. -e 'using Pkg; Pkg.instantiate(); Pkg.precompile();'", + "postStartCommand": "julia --project=. -e 'using Xranklin; Xranklin.serve();'", } From 92400a2532c821e95efb3ec2af4372ff81b3db4c Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Thu, 10 Aug 2023 12:09:41 -0500 Subject: [PATCH 4/5] build: Forward port 8000 for Franklin --- .devcontainer/devcontainer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 815d20b..dc56e4d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,4 +17,5 @@ }, "postCreateCommand": "julia --project=. -e 'using Pkg; Pkg.instantiate(); Pkg.precompile();'", "postStartCommand": "julia --project=. -e 'using Xranklin; Xranklin.serve();'", + "forwardPorts": [8000] } From 96c049293a6f2c7b31fde8edc8e012804ceaa6ba Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Thu, 10 Aug 2023 14:31:11 -0500 Subject: [PATCH 5/5] docs: Add instructions to build the site --- README.md | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2a97baa..9ae5e88 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,22 @@ [![Website URL badge](https://img.shields.io/badge/site-BioJulia.dev-blue)](https://biojulia.dev) +## Development +### Building the site -## Static Site Tech +The project devcontainer can be used. Check out [Get started with development Containers in Visual Studio Code](https://code.visualstudio.com/docs/devcontainers/tutorial) if you're not familar with devcontainers. -Using [Xranklin](https://github.com/tlienart/Xranklin.jl) under the hood. +Otherwise you can quickly build the site with the following commands: -### Celeste Template +```julia +julia> using Pkg; Pkg.instantiate(); Pkg.precompile(); +julia> using Xranklin; Xranklin.serve(); +``` -Based on the wonderful [Celeste](https://github.com/nicoelayda/celeste) by @nicoelayda. +The LiveServer will begin listening on http://localhost:8000/ ! -#### Development +### CSS Any changes to the CSS should be made to the SCSS files in `_sass/` and compiled using `Sass.jl` as follows: @@ -21,3 +26,11 @@ Sass.compile_file("style.scss", "../_css/celeste.min.css"; output_style = Sass.c ``` All the `Franklin.jl` related changes are in `_sass/adjust.scss` + +## Static Site Tech + +Using [Xranklin](https://github.com/tlienart/Xranklin.jl) under the hood. + +### Celeste Template + +Based on the wonderful [Celeste](https://github.com/nicoelayda/celeste) by @nicoelayda.