Skip to content

Commit

Permalink
adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
greimel committed Aug 17, 2023
1 parent 1491713 commit c592d49
Show file tree
Hide file tree
Showing 11 changed files with 170 additions and 306 deletions.
19 changes: 2 additions & 17 deletions .github/workflows/ExportNotebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Export Pluto notebooks & Deploy
on:
push:
branches:
- Fall22
- main
workflow_dispatch:
concurrency:
group: export
Expand Down Expand Up @@ -36,26 +36,13 @@ jobs:
restore-keys: |
${{ runner.os }}-dotjulia-v1-${{ hashFiles('**/Project.toml', '**/Manifest.toml') }}
# - name: 📅 Checkout Fall 20 output
# uses: actions/checkout@v2
# with:
# path: Fall20-franklin-output
# ref: Fall20-franklin-output

- name: 📅 Checkout Fall20 and Spring21 output
uses: actions/checkout@v2
with:
path: Spring21-franklin-output
ref: Spring21-franklin-output

- name: 🪴 Generate site
run: julia --project=pluto-deployment-environment -e '
import Pkg;
Pkg.instantiate();

include("./generate.jl")'


- name: 📰 Upload site generation report
uses: actions/upload-artifact@v2
if: always()
Expand All @@ -66,13 +53,11 @@ jobs:
run: |
mkdir www
mv _site www/Fall22
mv Spring21-franklin-output/Fall20/ www/Fall20
mv Spring21-franklin-output/Spring21/ www/Spring21
mv extra_outputs/* www
- name: 🚀 Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: Fall22-output
BRANCH: output
FOLDER: www
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@

.DS_Store

reduced_phil.png
notebooks/week9/testCSVwrite.csv

_cache
_site
generation_report.html
src/week9/testCSVwrite.csv
generation_report.html
2 changes: 1 addition & 1 deletion PlutoPages.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### A Pluto.jl notebook ###
# v0.19.14
# v0.19.27

using Markdown
using InteractiveUtils
Expand Down
34 changes: 2 additions & 32 deletions pluto-deployment-environment/PlutoDeployment.toml
Original file line number Diff line number Diff line change
@@ -1,43 +1,13 @@
[Export]
baked_state = false
baked_notebookfile = false
baked_notebookfile = true
offer_binder = true
slider_server_url="https://computationalthinking-sliderserver-droplet.plutojl.org"
ignore_cache = [
"index.jl",
]
create_index = false
create_index = true
exclude = [
# these are in the repo but not used on the website
"*/linear_transformation.jl",
"*/OLD_linear_transformation.jl",
"*/simulating_component_failure_live.jl",
"*/discrete_and_continuous_old.jl",
"*/pascal.jl",
"*/snowballearth_original.jl",
"tools/*",
"PlutoPages.jl",
]

[SliderServer]
port = 80
host = "0.0.0.0"
exclude=[
# these are in the repo but not used on the website
"*/linear_transformation.jl",
"*/OLD_linear_transformation.jl",
"*/simulating_component_failure_live.jl",
"*/discrete_and_continuous_old.jl",
"*/pascal.jl",
"*/snowballearth_original.jl",
"tools/*",
"PlutoPages.jl",

# not interactive
"*/basic_syntax.jl",
"*/structure.jl",
"*/how_to_collaborate_on_software.jl",

# don't run homeworks
"*/hw*.jl",
]
74 changes: 48 additions & 26 deletions src/_includes/layout.jlhtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
$(begin
using MarkdownLiteral: @markdown
import Pluto
"The contents of `<head>` from a Pluto HTML export."
const pluto_head = let
Expand All @@ -24,6 +25,15 @@ $(begin

isnothing(ch) || isnothing(se) ? nothing : "$(ch).$(se)"
end

hyperlink(href, description) = @htl("<a href=$(href)>$(description)</a>")

function by_authors(authors)
tmp = map(authors) do (; name, url)
hyperlink(url, name)
end
"by " * join(tmp, ", ", " &amp ") |> HTML
end

nothing
end)<html lang="en">
Expand Down Expand Up @@ -61,26 +71,35 @@ $(pluto_head)
<nav id="pages-sidebar">
<div>
<ul>
<li class="sidebar-about">
<div class="course-title">
<h1><a href="$(root_url)"><span>Introduction to</span> <span>Computational Thinking</span></a></h1>
<h2><span>Math from computation</span>, <span>math with computation</span></h2>
</div>
<div class="authors">
by <a href="http://math.mit.edu/~edelman">Alan Edelman</a>, <a href="http://sistemas.fciencias.unam.mx/~dsanders/">David P. Sanders</a> &amp; <a href="https://people.csail.mit.edu/cel/">Charles E. Leiserson</a>
</div>
</li>
<li>
<div class="search-bar">
<form action="$(root_url)/search" method="GET">
<input type="search" name="q" placeholder="Search...">
<input type=submit value="🔎">
</form>
</div>
</li>
$(let
sidebar_data = Base.include(@__MODULE__, joinpath(@__DIR__, "..", "sidebar data.jl"))
about = sidebar_data[:about]

@htl("""
<li class="sidebar-about">
<div class="course-title">

<h1><a href="$(root_url)"><span>$(about[:title])</span></a></h1>
<h2><span>$(about[:subtitle])</h2>
</div>
<div class="authors">
$(by_authors(about[:authors]))
</div>
</li>
<li>
<div class="search-bar">
<form action="$(root_url)/search" method="GET">
<input type="search" name="q" placeholder="Search...">
<input type=submit value="🔎">
</form>
</div>
</li>
""")
end)

$(let
sidebar_data = Base.include(@__MODULE__, joinpath(@__DIR__, "..", "sidebar data.jl"))
sections = sidebar_data["main"]
sections = sidebar_data[:main]

[
@htl("""
Expand Down Expand Up @@ -123,19 +142,22 @@ $(pluto_head)
end)
<li><hr></li>
<li class="sidebar-about">
$(begin
sidebar_data = Base.include(@__MODULE__, joinpath(@__DIR__, "..", "sidebar data.jl"))
about = sidebar_data[:about]

@htl("""
<div class="semester-details">
<a href="$(root_url)/semesters/">Fall 2022</a>
<div class="course-numbers"><span>18.S191</span> / <span>6.S083</span> / <span>22.S092</span></div>
<a href="$(root_url)/semesters/">$(about[:term])</a>
</div>
<div class="logos">
<picture title="Massachusetts Institute of Technology">
<img src="$(root_url)/assets/MIT_logo.svg">
</picture>
<picture title="Julia Programming Language">
<source srcset="$(root_url)/assets/julia-logo-dark.svg" media="(prefers-color-scheme: dark)" />
<img src="$(root_url)/assets/julia-logo-color.svg">
<picture title=$(about[:institution])>
<source srcset="$(root_url)/assets/$(about[:institution_logo_darkmode])" media="(prefers-color-scheme: dark)" />
<img src="$(root_url)/assets/$(about[:institution_logo])">
</picture>
</div>
""")
end)
</li>
</ul>
</div>
Expand Down
Loading

0 comments on commit c592d49

Please sign in to comment.