From 4b26ae67a4e305e9de75fb07c4ccd799eacc0751 Mon Sep 17 00:00:00 2001 From: Dimitri Merejkowsky Date: Wed, 12 Feb 2020 11:33:43 +0100 Subject: [PATCH] Remove hugo config files --- cours/archetypes/default.md | 6 ----- cours/config.yaml | 49 ------------------------------------- cours/deploy.py | 37 ---------------------------- 3 files changed, 92 deletions(-) delete mode 100644 cours/archetypes/default.md delete mode 100644 cours/config.yaml delete mode 100755 cours/deploy.py diff --git a/cours/archetypes/default.md b/cours/archetypes/default.md deleted file mode 100644 index 00e77bd..0000000 --- a/cours/archetypes/default.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "{{ replace .Name "-" " " | title }}" -date: {{ .Date }} -draft: true ---- - diff --git a/cours/config.yaml b/cours/config.yaml deleted file mode 100644 index c46e163..0000000 --- a/cours/config.yaml +++ /dev/null @@ -1,49 +0,0 @@ -baseURL: https://dmerej.info/books/python -title: Programmation en Python -theme: book -disableKinds: ['taxonomy', 'taxonomyTerm'] - -# Book configuration -disablePathToLower: true -enableGitInfo: true - -# Code highlight -pygmentsStyle: native -pygmentsCodeFences: true - - -params: - # (Optional, default 6) Set how many table of contents levels to be showed on page. - # Use false to hide ToC, note that 0 will default to 6 (https://gohugo.io/functions/default/) - # You can also specify this parameter per page in front matter - BookToC: 3 - - # (Optional, default none) Set the path to a logo for the book. If the logo is - # /static/logo.png then the path would be logo.png - # BookLogo: /logo.png - - # (Optional, default none) Set leaf bundle to render as side menu - # When not specified file structure and weights will be used - # BookMenuBundle: /menu - - # (Optional, default docs) Specify section of content to render as menu - # You can also set value to '*' to render all sections to menu - BookSection: docs - - # Set source repository location. - # Used for 'Last Modified' and 'Edit this page' links. - BookRepo: ~ - - # Enable "Edit this page" links for 'doc' page type. - # Disabled by default. Uncomment to enable. Requires 'BookRepo' param. - # Path must point to 'content' directory of repo. - BookEditPath: ~ - - # Configure the date format used on the pages - # - In git information - # - In blog posts - BookDateFormat: '2 Jan 2006' - - # (Optional, default true) Enables search function with flexsearch, - # Index is built on fly, therefore it might slowdown your website. - BookSearch: false diff --git a/cours/deploy.py b/cours/deploy.py deleted file mode 100755 index 4cfe3a9..0000000 --- a/cours/deploy.py +++ /dev/null @@ -1,37 +0,0 @@ -import argparse -import subprocess -import sys - - -def build(): - process = subprocess.run(["hugo"]) - if process.returncode != 0: - sys.exit("build failed") - - -def deploy(*, dry_run): - cmd = [ - "rsync", - "--itemize-changes", - "--recursive", - "--delete", - "public/", - "dedi3:/srv/nginx/html/books/python/", - ] - if dry_run: - cmd += ["--dry-run"] - process = subprocess.run(cmd) - if process.returncode != 0: - sys.exit("deployment failed") - - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument("-n", "--dry-run", action="store_true") - args = parser.parse_args() - build() - deploy(dry_run=args.dry_run) - - -if __name__ == "__main__": - main()