diff --git a/.github/workflows/Deploy.yml b/.github/workflows/Deploy.yml new file mode 100644 index 0000000..43ea169 --- /dev/null +++ b/.github/workflows/Deploy.yml @@ -0,0 +1,46 @@ +name: Build and Deploy +on: + push: + branches: + - main +jobs: + build-and-deploy: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + # NOTE: Python is necessary for the pre-rendering (minification) step + - name: Install python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + # NOTE: Here you can install dependencies such as matplotlib if you use + # packages such as PyPlot. + # - run: pip install matplotlib + - name: Install Julia + uses: julia-actions/setup-julia@v1 + with: + version: '1' # Latest stable Julia release. + # NOTE + # The steps below ensure that NodeJS and Franklin are loaded then it + # installs highlight.js which is needed for the prerendering step + # (code highlighting + katex prerendering). + # Then the environment is activated and instantiated to install all + # Julia packages which may be required to successfully build your site. + # The last line should be `optimize()` though you may want to give it + # specific arguments, see the documentation or ?optimize in the REPL. + - run: julia -e ' + using Pkg; Pkg.activate("."); Pkg.instantiate(); + using NodeJS; run(`$(npm_cmd()) install highlight.js`); + using Franklin; + optimize()' + - name: Build and Deploy + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: __site diff --git a/.gitignore b/.gitignore index e14ddf7..03642d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +.vscode/ +Manifest.toml + __site/ .DS_Store node_modules/ diff --git a/_assets/favicon.png b/_assets/favicon.png index 6bb6d57..a291542 100644 Binary files a/_assets/favicon.png and b/_assets/favicon.png differ diff --git a/_assets/infra/github.svg b/_assets/infra/github.svg new file mode 100644 index 0000000..0ee86fe --- /dev/null +++ b/_assets/infra/github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/_layout/header.html b/_layout/header.html index cd43d35..f5d3340 100644 --- a/_layout/header.html +++ b/_layout/header.html @@ -1,12 +1,12 @@
-
Basic Template
+
Stay tuned!
-
+ \ No newline at end of file diff --git a/about.md b/about.md new file mode 100644 index 0000000..9aee5da --- /dev/null +++ b/about.md @@ -0,0 +1,32 @@ ++++ +title = "About Julia_Dispatch.fm" ++++ + +# About Julia_Dispatch.fm + +(Last updated: {{ fill fd_mtime }}) + +In the summer of 2024, Michael has been ready for a change of pace. +He's realized his social skills are better than his programming skills, +so he should use that to help Julia. +At JuliaCon in Eindhoven, he's approached Chris about growing the ecosystem +by community work and outreach, maybe starting with a podcast? +Little did he know that Chris had been thinking about starting a Julia podcast +for a while by then. +It was the missing spark for ignition. +The two got to work immediately and here we are. + +## Your hosts + +Julia has a rich and diverse community. +You, too, could help us tell its story and introduce us to others. +We'd love to hear from you: send us your episodes or co-host with us. +Get in touch at [`hosts@juliadispatch.fm`](mailto:hosts@juliadispatch.fm). + +### Chris Rackauckas + +**todo** include mugshot and short bio + +### Michael Tiemann + +**todo** include mugshot and short bio diff --git a/config.md b/config.md index 59d2d5d..3d18924 100644 --- a/config.md +++ b/config.md @@ -2,7 +2,7 @@ Add here global page variables to use throughout your website. --> +++ -author = "Septimia Zenobia" +author = "The Julia Dispatch team" mintoclevel = 2 # uncomment and adjust the following line if the expected base URL of your website is something like [www.thebase.com/yourproject/] @@ -17,9 +17,9 @@ ignore = ["node_modules/"] # RSS (the website_{title, descr, url} must be defined to get RSS) generate_rss = true -website_title = "Franklin Template" -website_descr = "Example website using Franklin" -website_url = "https://tlienart.github.io/FranklinTemplates.jl/" +website_title = "Julia_Dispatch.fm" +website_descr = "A podcast about Julia projects and their contributors" +website_url = "https://juliadispatch.fm/" +++ diff --git a/index.md b/index.md index ee1f7b1..10c5ba1 100644 --- a/index.md +++ b/index.md @@ -1,187 +1,24 @@ -@def title = "Franklin Example" -@def tags = ["syntax", "code"] +@def title = "Julia_Dispatch.fm" -# How to use Franklin +# Julia_Dispatch.fm - A Julia Programming Podcast -\tableofcontents + -This section is meant as a refresher if you're new to Franklin. -Have a look at both how the website renders and the corresponding markdown (`index.md`). -Modify at will to get a feeling for how things work! +`Julia_Dispatch.fm` is a podcast about all that matters about Julia. +We'll meet the wonderful people who contribute to the community and the language ecosystem. +Hear their stories, learn what brought them to Julia, what excites them and how you could potentially follow in their footsteps. -Ps: if you want to modify the header or footer or the general look of the website, adjust the files in -* `src/_css/` and -* `src/_html_parts/`. +## Episodes -## The base with Markdown +### Coming Up -The [standard markdown syntax](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) can be used such as titles using `#`, lists: +#### Tim Holy -* element with **bold** -* element with _emph_ +[show notes] -or code-blocks `inline` or with highlighting (note the `@def hascode = true` in the source to allow [highlight.js](https://highlightjs.org/) to do its job): +## Footer -```julia -abstract type Point end -struct PointR2{T<:Real} <: Point - x::T - y::T -end -struct PointR3{T<:Real} <: Point - x::T - y::T - z::T -end -function len(p::T) where T<:Point - sqrt(sum(getfield(p, η)^2 for η ∈ fieldnames(T))) -end -``` +Links to all the available sources: -You can also quote stuff - -> You must have chaos within you to ... - -or have tables: - -| English | Mandarin | -| --------------- | ---------- | -| winnie the pooh | 维尼熊 | - -Note that you may have to do a bit of CSS-styling to get these elements to look the way you want them (the same holds for the whole page in fact). - -### Symbols and html entities - -If you want a dollar sign you have to escape it like so: \$, you can also use html entities like so: → or π or, if you're using Juno for instance, you can use `\pi[TAB]` to insert the symbol as is: π (it will be converted to a html entity).[^1] - -If you want to show a backslash, just use it like so: \ ; if you want to force a line break, use a ` \\ ` like \\ so (this is on a new line).[^blah] - -If you want to show a backtick, escape it like so: \` and if you want to show a tick in inline code use double backticks like ``so ` ...``. - -Footnotes are nice too: - -[^1]: this is the text for the first footnote, you can style all this looking at `.fndef` elements; note that the whole footnote definition is _expected to be on the same line_. -[^blah]: and this is a longer footnote with some blah from veggie ipsum: turnip greens yarrow ricebean rutabaga endive cauliflower sea lettuce kohlrabi amaranth water spinach avocado daikon napa cabbage asparagus winter purslane kale. Celery potato scallion desert raisin horseradish spinach carrot soko. - -## Basic Franklin extensions - -### Divs - -It is sometimes useful to have a short way to make a part of the page belong to a div so that it can be styled separately. -You can do this easily with Franklin by using `@@divname ... @@`. -For instance, you could want a blue background behind some text. - -@@colbox-blue -Here we go! (this is styled in the css sheet with name "colbox-blue"). -@@ - -Since it's just a `
` block, you can put this construction wherever you like and locally style your text. - -### LaTeX and Maths - -Essentially three things are imitated from LaTeX - -1. you can introduce definitions using `\newcommand` -1. you can use hyper-references with `\eqref`, `\cite`, ... -1. you can show nice maths (via KaTeX) - -The definitions can be introduced in the page or in the `config.md` (in which case they're available everywhere as opposed to just in that page). -For instance, the commands `\scal` and `\R` are defined in the config file (see `src/config.md`) and can directly be used whereas the command `\E` is defined below (and therefore only available on this page): - -\newcommand{\E}[1]{\mathbb E\left[#1\right]} - -Now we can write something like - -$$ \varphi(\E{X}) \le \E{\varphi(X)}. \label{equation blah} $$ - -since we've given it the label `\label{equation blah}`, we can refer it like so: \eqref{equation blah} which can be convenient for pages that are math-heavy. - -In a similar vein you can cite references that would be at the bottom of the page: \citep{noether15, bezanson17}. - -**Note**: the LaTeX commands you define can also incorporate standard markdown (though not in a math environment) so for instance let's define a silly `\bolditalic` command. - -\newcommand{\bolditalic}[1]{_**!#1**_} - -and use it \bolditalic{here for example}. - -Here's another quick one, a command to change the color: - -\newcommand{\col}[2]{~~~~~~!#2~~~~~~} - -This is \col{blue}{in blue} or \col{#bf37bc}{in #bf37bc}. - -### A quick note on whitespaces - -For most commands you will use `#k` to refer to the $k$-th argument as in LaTeX. -In order to reduce headaches, this forcibly introduces a whitespace on the left of whatever is inserted which, usually, changes nothing visible (e.g. in a math settings). -However there _may be_ situations where you do not want this to happen and you know that the insertion will not clash with anything else. -In that case, you should simply use `!#k` which will not introduce that whitespace. -It's probably easier to see this in action: - -\newcommand{\pathwith}[1]{`/usr/local/bin/#1`} -\newcommand{\pathwithout}[1]{`/usr/local/bin/!#1`} - -* with: \pathwith{script.jl}, there's a whitespace you don't want 🚫 -* without: \pathwithout{script.jl} here there isn't ✅ - -### Raw HTML - -You can include raw HTML by just surrounding a block with `~~~`. -Not much more to add. -This may be useful for local custom layouts like having a photo next to a text in a specific way. - -~~~ -
-
- -

- Marine iguanas are truly splendid creatures. They're found on the Gálapagos islands, have skin that basically acts as a solar panel, can swim and may have the ability to adapt their body size depending on whether there's food or not. -

-

- Evolution is cool. -

-
-
-
-~~~ - -**Note 1**: again, entire such blocks can be made into latex-like commands via `\newcommand{\mynewblock}[1]{...}`. - -**Note 2**: whatever is in a raw HTML block is *not* further processed (so you can't have LaTeX in there for instance). A partial way around this is to use `@@...` blocks which *will* be recursively parsed. The following code gives the same result as above with the small difference that there is LaTeX being processed in the inner div. - -@@row -@@container -@@left ![](/assets/rndimg.jpg) @@ -@@ -Marine iguanas are **truly splendid** creatures. They're not found in equations like $\exp(-i\pi)+1$. But they're still quite cool. -~~~ -
-~~~ -@@ - -## Pages and structure - -Here are a few empty pages connecting to the menu links to show where files can go and the resulting paths. (It's probably best if you look at the source folder for this). - -* [menu 1](/menu1/) -* [menu 2](/menu2/) -* [menu 3](/menu3/) - -## References (not really) - -* \biblabel{noether15}{Noether (1915)} **Noether**, Körper und Systeme rationaler Funktionen, 1915. -* \biblabel{bezanson17}{Bezanson et al. (2017)} **Bezanson**, **Edelman**, **Karpinski** and **Shah**, [Julia: a fresh approach to numerical computing](https://julialang.org/research/julia-fresh-approach-BEKS.pdf), SIAM review 2017. - -## Header and Footer - -As you can see here at the bottom of the page, there is a footer which you may want on all pages but for instance you may want the date of last modification to be displayed. -In a fashion heavily inspired by [Hugo](https://gohugo.io), you can write things like - -```html -Last modified: {{ fill fd_mtime }}. -``` - -(cf. `src/_html_parts/page_foot.html`) which will then replace these braces with the content of a dictionary of variables at the key `fd_mtime`. -This dictionary of variables is accessed locally by pages through `@def varname = value` and globally through the `config.md` page via the same syntax. - -There's a few other such functions of the form `{{fname p₁ p₂}}` as well as support for conditional blocks. If you wander through the `src/_html_parts/` folder and its content, you should be able to see those in action. +- +- Github [![Github logo](assets/infra/github.svg)](https://github.com/JuliaDispatch/) diff --git a/menu1.md b/menu1.md deleted file mode 100644 index cdee496..0000000 --- a/menu1.md +++ /dev/null @@ -1,86 +0,0 @@ -+++ -title = "Code blocks" -hascode = true -date = Date(2019, 3, 22) -rss = "A short description of the page which would serve as **blurb** in a `RSS` feed; you can use basic markdown here but the whole description string must be a single line (not a multiline string). Like this one for instance. Keep in mind that styling is minimal in RSS so for instance don't expect maths or fancy styling to work; images should be ok though: ![](https://upload.wikimedia.org/wikipedia/en/3/32/Rick_and_Morty_opening_credits.jpeg)" - -tags = ["syntax", "code"] -+++ - - -# Working with code blocks - -\toc - -## Live evaluation of code blocks - -If you would like to show code as well as what the code outputs, you only need to specify where the script corresponding to the code block will be saved. - -Indeed, what happens is that the code block gets saved as a script which then gets executed. -This also allows for that block to not be re-executed every time you change something _else_ on the page. - -Here's a simple example (change values in `a` to see the results being live updated): - -```julia:./exdot.jl -using LinearAlgebra -a = [1, 2, 3, 3, 4, 5, 2, 2] -@show dot(a, a) -println(dot(a, a)) -``` - -You can now show what this would look like: - -\output{./exdot.jl} - -**Notes**: -* you don't have to specify the `.jl` (see below), -* you do need to explicitly use print statements or `@show` for things to show, so just leaving a variable at the end like you would in the REPL will show nothing, -* only Julia code blocks are supported at the moment, there may be a support for scripting languages like `R` or `python` in the future, -* the way you specify the path is important; see [the docs](https://tlienart.github.io/franklindocs/code/index.html#more_on_paths) for more info. If you don't care about how things are structured in your `/assets/` folder, just use `./scriptname.jl`. If you want things to be grouped, use `./group/scriptname.jl`. For more involved uses, see the docs. - -Lastly, it's important to realise that if you don't change the content of the code, then that code will only be executed _once_ even if you make multiple changes to the text around it. - -Here's another example, - -```julia:./code/ex2 -for i ∈ 1:5, j ∈ 1:5 - print(" ", rpad("*"^i,5), lpad("*"^(6-i),5), j==5 ? "\n" : " "^4) -end -``` - -which gives the (utterly useless): - -\output{./code/ex2} - -note the absence of `.jl`, it's inferred. - -You can also hide lines (that will be executed nonetheless): - -```julia:./code/ex3 -using Random -Random.seed!(1) # hide -@show randn(2) -``` - -\output{./code/ex3} - - -## Including scripts - -Another approach is to include the content of a script that has already been executed. -This can be an alternative to the description above if you'd like to only run the code once because it's particularly slow or because it's not Julia code. -For this you can use the `\input` command specifying which language it should be tagged as: - - -\input{julia}{/_assets/scripts/script1.jl} - - -these scripts can be run in such a way that their output is also saved to file, see `scripts/generate_results.jl` for instance, and you can then also input the results: - -\output{/_assets/scripts/script1.jl} - -which is convenient if you're presenting code. - -**Note**: paths specification matters, see [the docs](https://tlienart.github.io/franklindocs/code/index.html#more_on_paths) for details. - -Using this approach with the `generate_results.jl` file also makes sure that all the code on your website works and that all results match the code which makes maintenance easier. diff --git a/menu2.md b/menu2.md deleted file mode 100644 index b5c9698..0000000 --- a/menu2.md +++ /dev/null @@ -1,129 +0,0 @@ -+++ -title = "More goodies" -hascode = true -rss = "A short description of the page which would serve as **blurb** in a `RSS` feed; you can use basic markdown here but the whole description string must be a single line (not a multiline string). Like this one for instance. Keep in mind that styling is minimal in RSS so for instance don't expect maths or fancy styling to work; images should be ok though: ![](https://upload.wikimedia.org/wikipedia/en/b/b0/Rick_and_Morty_characters.jpg)" -rss_title = "More goodies" -rss_pubdate = Date(2019, 5, 1) - -tags = ["syntax", "code", "image"] -+++ - -# More goodies - -\toc - -## More markdown support - -The Julia Markdown parser in Julia's stdlib is not exactly complete and Franklin strives to bring useful extensions that are either defined in standard specs such as Common Mark or that just seem like useful extensions. - -* indirect references for instance [like so] - -[like so]: http://existentialcomics.com/ - -or also for images - -![][some image] - -some people find that useful as it allows referring multiple times to the same link for instance. - -[some image]: https://upload.wikimedia.org/wikipedia/commons/9/90/Krul.svg - -* un-qualified code blocks are allowed and are julia by default, indented code blocks are not supported by default (and there support will disappear completely in later version) - -``` -a = 1 -b = a+1 -``` - -you can specify the default language with `@def lang = "julia"`. -If you actually want a "plain" code block, qualify it as `plaintext` like - -```plaintext -so this is plain-text stuff. -``` - -## A bit more highlighting - -Extension of highlighting for `pkg` an `shell` mode in Julia: - -```julia-repl -(v1.4) pkg> add Franklin -shell> blah -julia> 1+1 -(Sandbox) pkg> resolve -``` - -you can tune the colouring in the CSS etc via the following classes: - -* `.hljs-meta` (for `julia>`) -* `.hljs-metas` (for `shell>`) -* `.hljs-metap` (for `...pkg>`) - -## More customisation - -Franklin, by design, gives you a lot of flexibility to define how you want stuff be done, this includes doing your own parsing/processing and your own HTML generation using Julia code. - -In order to do this, you can define two types of functions in a `utils.jl` file which will complement your `config.md` file: - -* `hfun_*` allow you to plug custom-generated HTML somewhere -* `lx_*` allow you to do custom parsing of markdown and generation of HTML - -The former (`hfun_*`) is most likely to be useful. - -### Custom "hfun" - -If you define a function `hfun_bar` in the `utils.jl` then you have access to a new template function `{{bar ...}}`. The parameters are passed as a list of strings, for instance variable names but it could just be strings as well. - -For instance: - -```julia -function hfun_bar(vname) - val = Meta.parse(vname[1]) - return round(sqrt(val), digits=2) -end -``` - -~~~ -.hf {background-color:black;color:white;font-weight:bold;} -~~~ - -Can be called with `{{bar 4}}`: **{{bar 4}}**. - -Usually you will want to pass variable name (either local or global) and collect their value via one of `locvar`, `globvar` or `pagevar` depending on your use case. -Let's have another toy example: - -```julia -function hfun_m1fill(vname) - var = vname[1] - return pagevar("menu1", var) -end -``` - -Which you can use like this `{{m1fill title}}`: **{{m1fill title}}**. Of course in this specific case you could also have used `{{fill title menu1}}`: **{{fill title menu1}}**. - -Of course these examples are not very useful, in practice you might want to use it to generate actual HTML in a specific way using Julia code. -For instance you can use it to customise how [tag pages look like](/menu3/#customising_tag_pages). - -A nice example of what you can do is in the [SymbolicUtils.jl manual](https://juliasymbolics.github.io/SymbolicUtils.jl/api/) where they use a `hfun_` to generate HTML encapsulating the content of code docstrings, in a way doing something similar to what Documenter does. See [how they defined it](https://github.com/JuliaSymbolics/SymbolicUtils.jl/blob/website/utils.jl). - -**Note**: the output **will not** be reprocessed by Franklin, if you want to generate markdown which should be processed by Franklin, then use `return fd2html(markdown, internal=true)` at the end. - -### Custom "lx" - -These commands will look the same as latex commands but what they do with their content is now entirely controlled by your code. -You can use this to do your own parsing of specific chunks of your content if you so desire. - -The definition of `lx_*` commands **must** look like this: - -```julia -function lx_baz(com, _) - # keep this first line - brace_content = Franklin.content(com.braces[1]) # input string - # do whatever you want here - return uppercase(brace_content) -end -``` - -You can call the above with `\baz{some string}`: \baz{some string}. - -**Note**: the output **will be** reprocessed by Franklin, if you want to avoid this, then escape the output by using `return "~~~" * s * "~~~"` and it will be plugged in as is in the HTML. diff --git a/menu3.md b/menu3.md deleted file mode 100644 index 2b9be5c..0000000 --- a/menu3.md +++ /dev/null @@ -1,103 +0,0 @@ -+++ -title = "Menu 3" -+++ - -# Working with tags - -**Example**: - -* page with tag [`syntax`](/tag/syntax/) -* page with tag [`image`](/tag/image/) -* page with tag [`code`](/tag/code/) - -\toc - -## Indicating tags - -To mark a page with tags, add: - -```markdown -+++ -tags = ["tag1", "tag2"] -+++ -``` - -then that page, along with all others that have the tag `tag1` will be listed at `/tag/tag1/`. - -## Customising tag pages - -You can change how a `/tag/...` page looks like by modifying the `_layout/tag.html`. An important note is that you can **only** use **global** page variables (defined in `config.md`). - -There are three "exceptions": - -1. you can still use `{{ispage /tag/tagname/}} ... {{end}}` (or `{{isnotpage ...}}`) to have a different layout depending on the tag, -1. you can use the `fd_tag` variable which contains the name of the tag so `{{fill fd_tag}}` will input the tag string as is, -1. you can use `{{fill varname path/to/page}}` to exploit a page variable defined in a specific page. - -## Customising tag lists - -By default the tag list is very simple: it just collects all pages that match the tags and it shows them in a simple list by anti-chronological order (more recent at the top). - -You can customise this by defining your own `hfun_custom_taglist` function in the `utils.jl` file. The commented blueprint for the simple default setting is below and should give you an idea of how to write your own generator. - -Assuming you've defined such a function, don't forget to use `{{custom_taglist}}` in the `_layout/tag.html` instead of the default `{{taglist}}`. - -```julia -function hfun_custom_taglist()::String - # ----------------------------------------- - # Part1: Retrieve all pages associated with - # the tag & sort them - # ----------------------------------------- - # retrieve the tag string - tag = locvar(:fd_tag) - # recover the relative paths to all pages that have that - # tag, these are paths like /blog/page1 - rpaths = globvar("fd_tag_pages")[tag] - # you might want to sort these pages by chronological order - # you could also only show the most recent 5 etc... - sorter(p) = begin - # retrieve the "date" field of the page if defined, otherwise - # use the date of creation of the file - pvd = pagevar(p, :date) - if isnothing(pvd) - return Date(Dates.unix2datetime(stat(p * ".md").ctime)) - end - return pvd - end - sort!(rpaths, by=sorter, rev=true) - - # -------------------------------- - # Part2: Write the HTML to plug in - # -------------------------------- - # instantiate a buffer in which we will write the HTML - # to plug in the tag page - c = IOBuffer() - write(c, "...1...") - # go over all paths - for rpath in rpaths - # recover the url corresponding to the rpath - url = get_url(rpath) - # recover the title of the page if there is one defined, - # if there isn't, fallback on the path to the page - title = pagevar(rpath, "title") - if isnothing(title) - title = "/$rpath/" - end - # write some appropriate HTML - write(c, "...2...") - end - # finish the HTML - write(c, "...3...") - # return the HTML string - return String(take!(c)) -end -``` - -For instance the default uses: - -```html - - - -
  • $title
  • -``` diff --git a/transperancy.md b/transperancy.md new file mode 100644 index 0000000..cbccc7d --- /dev/null +++ b/transperancy.md @@ -0,0 +1,10 @@ ++++ +title = "Transparency" ++++ + +# Transperancy + +(Last updated: {{ fill fd_mtime }}) + +**TODO** list our expenses and how we finance them +**todo** what else could be made transparent? \ No newline at end of file