Browse Source

Remove hugo config files

master
Dimitri Merejkowsky 4 years ago
parent
commit
4b26ae67a4
3 changed files with 0 additions and 92 deletions
  1. +0
    -6
      cours/archetypes/default.md
  2. +0
    -49
      cours/config.yaml
  3. +0
    -37
      cours/deploy.py

+ 0
- 6
cours/archetypes/default.md View File

@@ -1,6 +0,0 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---


+ 0
- 49
cours/config.yaml View File

@@ -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

+ 0
- 37
cours/deploy.py View File

@@ -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()