diff options
author | Yann Herklotz <git@yannherklotz.com> | 2021-09-17 11:10:48 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2021-09-17 11:10:48 +0100 |
commit | 69700e5d5f8e34304a982808dffa731923607a8e (patch) | |
tree | 853b2a38ff0d74ca8daabb06ca1dd5d82b865ea7 | |
parent | 8c75c6609c543dbd32eac1e2665399e6fd24a48e (diff) | |
parent | 6fd6fae561484f00b85cae265e5b11d3ceea744e (diff) | |
download | yannherklotz.com-69700e5d5f8e34304a982808dffa731923607a8e.tar.gz yannherklotz.com-69700e5d5f8e34304a982808dffa731923607a8e.zip |
Merge remote-tracking branch 'origin/master'
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | config.toml | 7 | ||||
-rw-r--r-- | content.org | 49 | ||||
-rw-r--r-- | static/css/syntax.css | 86 | ||||
-rw-r--r-- | static/css/syntax_dark.css | 86 | ||||
m--------- | themes/ymherklotz | 10 |
6 files changed, 208 insertions, 31 deletions
@@ -1 +1,2 @@ .DS_Store +content/ diff --git a/config.toml b/config.toml index e351cdf..7b932eb 100644 --- a/config.toml +++ b/config.toml @@ -8,8 +8,11 @@ theme = "ymherklotz" katex = true offen = true +[permalinks] + blog = '/:year/:month/:title/' + [markup.goldmark.renderer] unsafe = true -[permalinks] - blog = '/:year/:month/:title/' +[markup.highlight] + noClasses = false diff --git a/content.org b/content.org index 1923907..669c531 100644 --- a/content.org +++ b/content.org @@ -441,20 +441,20 @@ features Nix has that makes it pleasant to work with. Just like many other functional languages, Nix has =let= expressions which bind an expression to a name. -#+begin_src emacs-lisp +#+begin_src nix let name = expr; in body #+end_src It also supports importing an expression, which just evaluates and inserts an expression. -#+begin_src emacs-lisp +#+begin_src nix import ./expression.nix; #+end_src The =with= expression is also interesting, which makes all the attributes of a set available in the next expression, unqualified. -#+begin_src emacs-lisp +#+begin_src nix with set; expr #+end_src @@ -486,7 +486,7 @@ set into scope. We then call the =mkDerivation= function to override some of the set, such as the name (=name=), the location of the source code (=src=). These are the only two required attributes for the =mkDerivation= function, however, that does not mean it will build yet. -#+begin_src emacs-lisp +#+begin_src nix with import <nixpkgs> {}; stdenv.mkDerivation { @@ -505,10 +505,11 @@ those. The first is customise the build step using the =buildPhase= attribute. B will just execute =make=, however, in this project the =makefile= is actually in the =src= directory. We therefore have to change to that directory first before we can do anything. -#+begin_src emacs-lisp - buildPhase = '' - cd src && make - ''; +#+begin_src nix + { ...; + buildPhase = '' + cd src && make + ''; } #+end_src This will now execute the makefile correctly, however, it will fail the build because =Vellvm= has a @@ -517,23 +518,23 @@ try and find them in Nix and can add them as build dependencies. Here we can spe dependencies using =coqPackages=, OCaml dependencies using =ocamlPackages=, and finally command line tools such as the OCaml compiler or the OCaml build system =dune=. -#+begin_src emacs-lisp - buildInputs = [ git coq ocamlPackages.menhir dune coqPackages.flocq - coqPackages.coq-ext-lib coqPackages.paco - coqPackages.ceres ocaml ]; +#+begin_src nix + { ...; buildInputs = [ git coq ocamlPackages.menhir dune coqPackages.flocq + coqPackages.coq-ext-lib coqPackages.paco + coqPackages.ceres ocaml ]; } #+end_src Finally, Nix will execute =make install= automatically at the end to install the program correctly. In this case, we need to set the =COQLIB= flag so that it knows where to place the compiled Coq theories. These can be set using the =installFlags= attribute. -#+begin_src emacs-lisp - installFlags = [ "COQLIB=$(out)/lib/coq/${coq.coq-version}/" ]; +#+begin_src nix + { ...; installFlags = [ "COQLIB=$(out)/lib/coq/${coq.coq-version}/" ]; } #+end_src We then have the following Nix derivation which should download =Vellvm= and build it correctly. -#+begin_src emacs-lisp +#+begin_src nix with import <nixpkgs> {}; stdenv.mkDerivation { @@ -561,8 +562,8 @@ itself. We can therefore define a derivation in the following way. We can use =p to define dependencies that the package needs and that derivations using this package will also need. In this case, any derivation using =ceres= will need Coq, otherwise it would not be useful. -#+begin_src emacs-lisp - ceres = stdenv.mkDerivation { +#+begin_src nix + let ceres = stdenv.mkDerivation { name = "coq${coq.coq-version}-ceres"; src = fetchGit { @@ -572,7 +573,7 @@ need. In this case, any derivation using =ceres= will need Coq, otherwise it wou propagatedBuildInputs = [ coq ]; installFlags = [ "COQLIB=$(out)/lib/coq/${coq.coq-version}/" ]; - }; + }; in #+end_src Finally, we can use a =let= expression to insert it as a dependency into our own derivation. We now @@ -582,7 +583,7 @@ have a complete nix expression that will always build =Vellvm= correctly in a co nix-prefetch-url --unpack https://github.com/Lysxia/coq-ceres/archive/4e682cf97ec0006a9d5b3f98e648e5d69206b614.tar.gz #+end_src -#+begin_src emacs-lisp +#+begin_src nix with import <nixpkgs> {}; let @@ -956,7 +957,7 @@ extensible enough to allow for different types of posts, which are called *colle My layout, which supports project descriptions for a portfolio and blog posts, looks like the following. -#+begin_src emacs-lisp +#+begin_src text . ├── assets │ ├── css @@ -978,7 +979,7 @@ following. To make Jekyll recognise the =_portfolio= directory, it has to be declared in Jekyll's configuration file =_config.yml=. -#+begin_src emacs-lisp +#+begin_src yaml collections: portfolio: output: true @@ -987,7 +988,7 @@ file =_config.yml=. Jekyll will now parse and turn the markdown files into HTML. To get a coherent link to the files, it is a good idea to add a *permalink* to the YAML front matter like the following. -#+begin_src emacs-lisp +#+begin_src yaml --- title: FMark permalink: /portfolio/fmark/ @@ -1008,7 +1009,7 @@ you can use a for loop to iterate through the projects, and even use a limit to to a specific number. This can be useful when showing a few projects on the main page, and also want a page displaying all the projects. -#+begin_src emacs-lisp +#+begin_src text {%- raw -%} {% assign proj_reverse = site.portfolio | reverse %} {% for project in proj_reverse limit: 3 %} @@ -1020,7 +1021,7 @@ projects, the list first has to be reversed. Inside the for loop, variables like -#+begin_src emacs-lisp +#+begin_src text {%- raw -%} {{ project.title }} {{ project.excerpt }} diff --git a/static/css/syntax.css b/static/css/syntax.css new file mode 100644 index 0000000..50e3a83 --- /dev/null +++ b/static/css/syntax.css @@ -0,0 +1,86 @@ +@media (prefers-color-scheme: light) { + +/* Background */ .chroma { background-color: #fffff8 } +/* Other */ .chroma .x { } +/* Error */ .chroma .err { color: #ff0000; background-color: #ffaaaa } +/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } +/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } +/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } +/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* Keyword */ .chroma .k { color: #0000aa } +/* KeywordConstant */ .chroma .kc { color: #0000aa } +/* KeywordDeclaration */ .chroma .kd { color: #0000aa } +/* KeywordNamespace */ .chroma .kn { color: #0000aa } +/* KeywordPseudo */ .chroma .kp { color: #0000aa } +/* KeywordReserved */ .chroma .kr { color: #0000aa } +/* KeywordType */ .chroma .kt { color: #00aaaa } +/* Name */ .chroma .n { } +/* NameAttribute */ .chroma .na { color: #1e90ff } +/* NameBuiltin */ .chroma .nb { color: #00aaaa } +/* NameBuiltinPseudo */ .chroma .bp { } +/* NameClass */ .chroma .nc { color: #00aa00; text-decoration: underline } +/* NameConstant */ .chroma .no { color: #aa0000 } +/* NameDecorator */ .chroma .nd { color: #888888 } +/* NameEntity */ .chroma .ni { color: #880000; font-weight: bold } +/* NameException */ .chroma .ne { } +/* NameFunction */ .chroma .nf { color: #00aa00 } +/* NameFunctionMagic */ .chroma .fm { } +/* NameLabel */ .chroma .nl { } +/* NameNamespace */ .chroma .nn { color: #00aaaa; text-decoration: underline } +/* NameOther */ .chroma .nx { } +/* NameProperty */ .chroma .py { } +/* NameTag */ .chroma .nt { color: #1e90ff; font-weight: bold } +/* NameVariable */ .chroma .nv { color: #aa0000 } +/* NameVariableClass */ .chroma .vc { } +/* NameVariableGlobal */ .chroma .vg { } +/* NameVariableInstance */ .chroma .vi { } +/* NameVariableMagic */ .chroma .vm { } +/* Literal */ .chroma .l { } +/* LiteralDate */ .chroma .ld { } +/* LiteralString */ .chroma .s { color: #aa5500 } +/* LiteralStringAffix */ .chroma .sa { color: #aa5500 } +/* LiteralStringBacktick */ .chroma .sb { color: #aa5500 } +/* LiteralStringChar */ .chroma .sc { color: #aa5500 } +/* LiteralStringDelimiter */ .chroma .dl { color: #aa5500 } +/* LiteralStringDoc */ .chroma .sd { color: #aa5500 } +/* LiteralStringDouble */ .chroma .s2 { color: #aa5500 } +/* LiteralStringEscape */ .chroma .se { color: #aa5500 } +/* LiteralStringHeredoc */ .chroma .sh { color: #aa5500 } +/* LiteralStringInterpol */ .chroma .si { color: #aa5500 } +/* LiteralStringOther */ .chroma .sx { color: #aa5500 } +/* LiteralStringRegex */ .chroma .sr { color: #009999 } +/* LiteralStringSingle */ .chroma .s1 { color: #aa5500 } +/* LiteralStringSymbol */ .chroma .ss { color: #0000aa } +/* LiteralNumber */ .chroma .m { color: #009999 } +/* LiteralNumberBin */ .chroma .mb { color: #009999 } +/* LiteralNumberFloat */ .chroma .mf { color: #009999 } +/* LiteralNumberHex */ .chroma .mh { color: #009999 } +/* LiteralNumberInteger */ .chroma .mi { color: #009999 } +/* LiteralNumberIntegerLong */ .chroma .il { color: #009999 } +/* LiteralNumberOct */ .chroma .mo { color: #009999 } +/* Operator */ .chroma .o { } +/* OperatorWord */ .chroma .ow { color: #0000aa } +/* Punctuation */ .chroma .p { } +/* Comment */ .chroma .c { color: #aaaaaa; font-style: italic } +/* CommentHashbang */ .chroma .ch { color: #aaaaaa; font-style: italic } +/* CommentMultiline */ .chroma .cm { color: #aaaaaa; font-style: italic } +/* CommentSingle */ .chroma .c1 { color: #aaaaaa; font-style: italic } +/* CommentSpecial */ .chroma .cs { color: #0000aa; font-style: italic } +/* CommentPreproc */ .chroma .cp { color: #4c8317 } +/* CommentPreprocFile */ .chroma .cpf { color: #4c8317 } +/* Generic */ .chroma .g { } +/* GenericDeleted */ .chroma .gd { color: #aa0000 } +/* GenericEmph */ .chroma .ge { font-style: italic } +/* GenericError */ .chroma .gr { color: #aa0000 } +/* GenericHeading */ .chroma .gh { color: #000080; font-weight: bold } +/* GenericInserted */ .chroma .gi { color: #00aa00 } +/* GenericOutput */ .chroma .go { color: #888888 } +/* GenericPrompt */ .chroma .gp { color: #555555 } +/* GenericStrong */ .chroma .gs { font-weight: bold } +/* GenericSubheading */ .chroma .gu { color: #800080; font-weight: bold } +/* GenericTraceback */ .chroma .gt { color: #aa0000 } +/* GenericUnderline */ .chroma .gl { text-decoration: underline } +/* TextWhitespace */ .chroma .w { color: #bbbbbb } + +} diff --git a/static/css/syntax_dark.css b/static/css/syntax_dark.css new file mode 100644 index 0000000..4b67ed1 --- /dev/null +++ b/static/css/syntax_dark.css @@ -0,0 +1,86 @@ +@media (prefers-color-scheme: dark) { + +/* Background */ .chroma { color: #f8f8f2; background-color: #171d30 } +/* Other */ .chroma .x { } +/* Error */ .chroma .err { } +/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } +/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } +/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } +/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* Keyword */ .chroma .k { color: #ff79c6 } +/* KeywordConstant */ .chroma .kc { color: #ff79c6 } +/* KeywordDeclaration */ .chroma .kd { color: #8be9fd; font-style: italic } +/* KeywordNamespace */ .chroma .kn { color: #ff79c6 } +/* KeywordPseudo */ .chroma .kp { color: #ff79c6 } +/* KeywordReserved */ .chroma .kr { color: #ff79c6 } +/* KeywordType */ .chroma .kt { color: #8be9fd } +/* Name */ .chroma .n { } +/* NameAttribute */ .chroma .na { color: #50fa7b } +/* NameBuiltin */ .chroma .nb { color: #8be9fd; font-style: italic } +/* NameBuiltinPseudo */ .chroma .bp { } +/* NameClass */ .chroma .nc { color: #50fa7b } +/* NameConstant */ .chroma .no { } +/* NameDecorator */ .chroma .nd { } +/* NameEntity */ .chroma .ni { } +/* NameException */ .chroma .ne { } +/* NameFunction */ .chroma .nf { color: #50fa7b } +/* NameFunctionMagic */ .chroma .fm { } +/* NameLabel */ .chroma .nl { color: #8be9fd; font-style: italic } +/* NameNamespace */ .chroma .nn { } +/* NameOther */ .chroma .nx { } +/* NameProperty */ .chroma .py { } +/* NameTag */ .chroma .nt { color: #ff79c6 } +/* NameVariable */ .chroma .nv { color: #8be9fd; font-style: italic } +/* NameVariableClass */ .chroma .vc { color: #8be9fd; font-style: italic } +/* NameVariableGlobal */ .chroma .vg { color: #8be9fd; font-style: italic } +/* NameVariableInstance */ .chroma .vi { color: #8be9fd; font-style: italic } +/* NameVariableMagic */ .chroma .vm { } +/* Literal */ .chroma .l { } +/* LiteralDate */ .chroma .ld { } +/* LiteralString */ .chroma .s { color: #f1fa8c } +/* LiteralStringAffix */ .chroma .sa { color: #f1fa8c } +/* LiteralStringBacktick */ .chroma .sb { color: #f1fa8c } +/* LiteralStringChar */ .chroma .sc { color: #f1fa8c } +/* LiteralStringDelimiter */ .chroma .dl { color: #f1fa8c } +/* LiteralStringDoc */ .chroma .sd { color: #f1fa8c } +/* LiteralStringDouble */ .chroma .s2 { color: #f1fa8c } +/* LiteralStringEscape */ .chroma .se { color: #f1fa8c } +/* LiteralStringHeredoc */ .chroma .sh { color: #f1fa8c } +/* LiteralStringInterpol */ .chroma .si { color: #f1fa8c } +/* LiteralStringOther */ .chroma .sx { color: #f1fa8c } +/* LiteralStringRegex */ .chroma .sr { color: #f1fa8c } +/* LiteralStringSingle */ .chroma .s1 { color: #f1fa8c } +/* LiteralStringSymbol */ .chroma .ss { color: #f1fa8c } +/* LiteralNumber */ .chroma .m { color: #bd93f9 } +/* LiteralNumberBin */ .chroma .mb { color: #bd93f9 } +/* LiteralNumberFloat */ .chroma .mf { color: #bd93f9 } +/* LiteralNumberHex */ .chroma .mh { color: #bd93f9 } +/* LiteralNumberInteger */ .chroma .mi { color: #bd93f9 } +/* LiteralNumberIntegerLong */ .chroma .il { color: #bd93f9 } +/* LiteralNumberOct */ .chroma .mo { color: #bd93f9 } +/* Operator */ .chroma .o { color: #ff79c6 } +/* OperatorWord */ .chroma .ow { color: #ff79c6 } +/* Punctuation */ .chroma .p { } +/* Comment */ .chroma .c { color: #6272a4 } +/* CommentHashbang */ .chroma .ch { color: #6272a4 } +/* CommentMultiline */ .chroma .cm { color: #6272a4 } +/* CommentSingle */ .chroma .c1 { color: #6272a4 } +/* CommentSpecial */ .chroma .cs { color: #6272a4 } +/* CommentPreproc */ .chroma .cp { color: #ff79c6 } +/* CommentPreprocFile */ .chroma .cpf { color: #ff79c6 } +/* Generic */ .chroma .g { } +/* GenericDeleted */ .chroma .gd { color: #ff5555 } +/* GenericEmph */ .chroma .ge { text-decoration: underline } +/* GenericError */ .chroma .gr { } +/* GenericHeading */ .chroma .gh { font-weight: bold } +/* GenericInserted */ .chroma .gi { color: #50fa7b; font-weight: bold } +/* GenericOutput */ .chroma .go { color: #44475a } +/* GenericPrompt */ .chroma .gp { } +/* GenericStrong */ .chroma .gs { } +/* GenericSubheading */ .chroma .gu { font-weight: bold } +/* GenericTraceback */ .chroma .gt { } +/* GenericUnderline */ .chroma .gl { text-decoration: underline } +/* TextWhitespace */ .chroma .w { } + +} diff --git a/themes/ymherklotz b/themes/ymherklotz -Subproject 706219525d8598be3c28a05d188a0052e79898a +Subproject 71ec37281fdd4426e76db3340ad17739538b702 |