Skip to content

Commit f687570

Browse files
committed
Initial commit
0 parents  commit f687570

File tree

91 files changed

+1878
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1878
-0
lines changed

.github/workflows/Deploy.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build and Deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- master
7+
jobs:
8+
build-and-deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
with:
14+
persist-credentials: false
15+
# NOTE: Python is necessary for the pre-rendering (minification) step
16+
- name: Install python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: '3.8'
20+
# NOTE: Here you can install dependencies such as matplotlib if you use
21+
# packages such as PyPlot.
22+
# - run: pip install matplotlib
23+
- name: Install Julia
24+
uses: julia-actions/setup-julia@v1
25+
with:
26+
version: 1.5
27+
# NOTE
28+
# The steps below ensure that NodeJS and Franklin are loaded then it
29+
# installs highlight.js which is needed for the prerendering step
30+
# (code highlighting + katex prerendering).
31+
# Then the environment is activated and instantiated to install all
32+
# Julia packages which may be required to successfully build your site.
33+
# The last line should be `optimize()` though you may want to give it
34+
# specific arguments, see the documentation or ?optimize in the REPL.
35+
- run: julia -e '
36+
using Pkg; Pkg.activate("."); Pkg.instantiate();
37+
using NodeJS; run(`$(npm_cmd()) install highlight.js`);
38+
using Franklin;
39+
optimize()'
40+
- name: Build and Deploy
41+
uses: JamesIves/github-pages-deploy-action@releases/v3
42+
with:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
BRANCH: gh-pages
45+
FOLDER: __site

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
__site/
2+
.DS_Store
3+
node_modules/
4+
package-lock.json
5+
*~
6+
.*.swp
7+
.*.swo
8+
_assets/scripts/output/

404.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@def title = "404"
2+
3+
~~~
4+
<div style="margin-top: 40px; font-size: 40px; text-align: center;">
5+
6+
<br>
7+
8+
<div style="font-weight: bold;">
9+
404
10+
</div>
11+
12+
<br>
13+
<br>
14+
15+
The requested page was not found
16+
17+
<br>
18+
<br>
19+
<br>
20+
<br>
21+
22+
<div style="margin-bottom: 300px; font-size: 24px">
23+
<a href="/">Click here</a> to go back to the homepage.
24+
</div>
25+
26+
</div>
27+
~~~

Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[deps]
2+
Franklin = "713c75ef-9fc9-4b05-94a9-213340da978e"
3+
NodeJS = "2bd173c7-0d6d-553b-b6af-13a54713934c"

_assets/favicon.png

768 Bytes
Loading
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Parent file to run all scripts which may generate
2+
# some output that you want to display on the website.
3+
# this can be used as a tester to check that all the code
4+
# on your website runs properly.
5+
6+
dir = @__DIR__
7+
8+
"""
9+
genplain(s)
10+
11+
Small helper function to run some code and redirect the output (stdout) to a file.
12+
"""
13+
function genplain(s::String)
14+
open(joinpath(dir, "output", "$(splitext(s)[1]).txt"), "w") do outf
15+
redirect_stdout(outf) do
16+
include(joinpath(dir, s))
17+
end
18+
end
19+
end
20+
21+
genplain("script1.jl")
22+
include("script2.jl")

_assets/scripts/script1.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using LinearAlgebra # HIDE
2+
using Random:seed! # HIDE
3+
seed!(0) # HIDE
4+
# HIDE
5+
x = randn(5)
6+
y = randn(5)
7+
8+
for i in 1:5
9+
println(rpad("*"^i, 10, '-'), round(dot(x, y), digits=1))
10+
end

_assets/scripts/script2.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
using PyPlot
2+
x = range(0, stop=1, length=50)
3+
plot(x, sin.(2x).*exp.(-x/3))
4+
savefig(joinpath(@__DIR__, "output", "script2.svg"))

0 commit comments

Comments
 (0)