From acb59721d3246d1a98eefdd149620dc1fdb67147 Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Thu, 23 Apr 2020 19:44:32 +0200 Subject: [PATCH] Fixed style, theme, spec files explanations. --- config.toml | 54 ++++++++++++- .../baguette/{_index.fr.md => index.fr.md} | 0 content/baguette/{_index.md => index.md} | 79 +++++++++++++++---- .../{index.fr.md => _index.fr.md} | 0 .../2020/new-homepage/{index.md => _index.md} | 4 +- sass/custom.scss | 11 +++ 6 files changed, 130 insertions(+), 18 deletions(-) rename content/baguette/{_index.fr.md => index.fr.md} (100%) rename content/baguette/{_index.md => index.md} (94%) rename content/blog/2020/new-homepage/{index.fr.md => _index.fr.md} (100%) rename content/blog/2020/new-homepage/{index.md => _index.md} (75%) diff --git a/config.toml b/config.toml index 33fd5e6..01754c3 100644 --- a/config.toml +++ b/config.toml @@ -2,6 +2,7 @@ base_url = "https://baguette.netlib.re/" theme = "water" +# theme = "after-dark" # Whether to automatically compile all Sass files in the sass directory compile_sass = true @@ -10,6 +11,44 @@ compile_sass = true # Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola highlight_code = true +# highlight_theme = "1337" +# highlight_theme = "agola-dark" +# highlight_theme = "ascetic-white" +# highlight_theme = "axar" +# highlight_theme = "ayu-dark" +# highlight_theme = "ayu-light" +# highlight_theme = "ayu-mirage" +# highlight_theme = "base16-ocean-dark" +# highlight_theme = "base16-ocean-light" +# highlight_theme = "bbedit" +# highlight_theme = "boron" +# highlight_theme = "charcoal" +# highlight_theme = "cheerfully-light" +# highlight_theme = "classic-modified" +# highlight_theme = "demain" +highlight_theme = "dimmed-fluid" +# highlight_theme = "dracula" +# highlight_theme = "gray-matter-dark" +# highlight_theme = "gruvbox-dark" +# highlight_theme = "gruvbox-light" +# highlight_theme = "idle" +# highlight_theme = "inspired-github" +# highlight_theme = "ir-white" +# highlight_theme = "kronuz" +# highlight_theme = "material-dark" +# highlight_theme = "material-light" +# highlight_theme = "monokai" +# highlight_theme = "nyx-bold" +# highlight_theme = "one-dark" +# highlight_theme = "solarized-dark" +# highlight_theme = "solarized-light" +# highlight_theme = "subway-madrid" +# highlight_theme = "subway-moscow" +# highlight_theme = "Tomorrow" +# highlight_theme = "visual-studio-dark" +# highlight_theme = "zenburn" + + # Whether to build a search index to be used later on by a JavaScript library build_search_index = false @@ -22,9 +61,17 @@ languages = [ {code = "fr", rss = true} ] + +# for after dark theme +#taxonomies = [ +# # You can enable/disable RSS +# {name = "categories", rss = true}, +# {name = "tags", rss = true}, +#] + [extra] -header = "header" +header = "_common/header.md" menu = "menu" # .scss are automatically compiled in .css @@ -32,8 +79,11 @@ stylesheets = [ "custom.css" ] # The common part of the title (appended to page/section titles) title = " | baguette" -color = "dark" +color = "light" max_width_for = "body" + +max_width = "1400px" + [extra.forge] # The baseURL for files tracked on the forge browse = "https://git.baguette.netlib.re/Baguette/website/src/branch/master/" diff --git a/content/baguette/_index.fr.md b/content/baguette/index.fr.md similarity index 100% rename from content/baguette/_index.fr.md rename to content/baguette/index.fr.md diff --git a/content/baguette/_index.md b/content/baguette/index.md similarity index 94% rename from content/baguette/_index.md rename to content/baguette/index.md index f0a889d..9560bae 100644 --- a/content/baguette/_index.md +++ b/content/baguette/index.md @@ -274,27 +274,56 @@ All our tools are designed to be simple to use, to understand, to read. TODO: spec files, the file format used in `package`, `packaging` and `service`. +--- + + +**Spec files.** *our declarative format*
+Before presenting our tools, here a file format named `spec` that we tend to use when relevant. +It is *declarative*: we tend not to tell instructions how to do things (copy this file here, download this, etc.) but to describe something (url of the project is `https://example.com/xxx`). +This way, we can provide an easy to understand format which looks like YAML a lot, but allows us to do much more. +Here a quick example. + ```yaml -name: hello -version: 2.10 -release: 2 -sources: https://ftp.gnu.org/gnu/hello/hello-%{version}.tar.gz +# This is a comment -dependencies: - - gettext +# This is a simple variable instanciation +variable: value -build-dependencies: - - make +# This is a inlined list +list: a, b , c -options: - - configure: --disable-nls +# This is a multiline list +list: + - a + - b + - c +``` +And now, we can add `block sections` to it: sometime we do want to tell instructions. + +```yaml +# We have the URL of the tarballs for a software +software-url: 'https://example.com/my-software/' + +# ... and we want to get its last version number +# "@watch" is a section, the name "watch" has a meaning in the application reading the file @watch - curl 'https://ftp.gnu.org/gnu/hello/' -o- 2>/dev/null | - sed -n "/hello-.*\.tar\.gz/{s/\.tar\.gz.*//;s/.*hello-//;p}" | + # the following is simple shell scripting + curl %{software-url} -o- 2>/dev/null | \ + sed "s/_my-software.tar.gz//" | \ tail -1 ``` +Sometime, we want to refer to a file (or directory), and add metadata to it. +```yaml +# as for "@watch", "%configuration" has a meaning in the application reading the file +# this time, the block is named +%configuration postgresql.conf + # within a named block, we find simple declarations as outside the block + name: database configuration + creation-command: my-script.sh -a -b -c +``` + --- TODO: explains why it's different / better than other package managers. @@ -317,6 +346,28 @@ Package's configuration is a list of repositories, authorized package signing ke Packaging uses simple, declarative recipe files, here some examples: [hello][recipe-hello], [dhcpcd][recipe-dhcpcd], [alsa-utils][recipe-alsautils]. The only required parameters are `name` and `sources`. +```yaml +# GNU Hello example program +name: hello +version: 2.10 +release: 2 +sources: https://ftp.gnu.org/gnu/hello/hello-%{version}.tar.gz + +dependencies: + - gettext + +build-dependencies: + - make + +options: + - configure: --disable-nls + +@watch + curl 'https://ftp.gnu.org/gnu/hello/' -o- 2>/dev/null | + sed -n "/hello-.*\.tar\.gz/{s/\.tar\.gz.*//;s/.*hello-//;p}" | + tail -1 +``` + Packaging creates build environments to test packages before validation. It works as follow: @@ -402,14 +453,14 @@ Remote remote communications are transparent. C library with Crystal bindings (other languages coming soon) -

+```Crystal
 require "ipc.cr"
 
 server = IPC::Service.new "MyService"
 server.loop do |message|
     # ...
 end
-
+``` TODO: show that's easy to write even in plain C. diff --git a/content/blog/2020/new-homepage/index.fr.md b/content/blog/2020/new-homepage/_index.fr.md similarity index 100% rename from content/blog/2020/new-homepage/index.fr.md rename to content/blog/2020/new-homepage/_index.fr.md diff --git a/content/blog/2020/new-homepage/index.md b/content/blog/2020/new-homepage/_index.md similarity index 75% rename from content/blog/2020/new-homepage/index.md rename to content/blog/2020/new-homepage/_index.md index 1e608fa..ce9b0ca 100644 --- a/content/blog/2020/new-homepage/index.md +++ b/content/blog/2020/new-homepage/_index.md @@ -1,9 +1,9 @@ +++ -title = "A new homepage for dnsmanager" +title = "A new website for Baguette" date = 2020-03-29 +++ -Today, we are opening a website for dnsmanager! +Today, we are opening a website for Baguette! It should display properly on all devices including mobile phones. If that's not the case, please let us know about it or submit a patch yourself. diff --git a/sass/custom.scss b/sass/custom.scss index 36a162f..12b6c42 100644 --- a/sass/custom.scss +++ b/sass/custom.scss @@ -28,3 +28,14 @@ red { // margin-bottom: -1px; //} +@media screen and (min-width: 768px) { + html { + font-size: 1.1em; + } + pre { + font-size: 1.2em; + } + .container { + max-width: 80rem; + } +}