From 8f32ee47661187882bffefdff1af82c18a0965c7 Mon Sep 17 00:00:00 2001 From: shockrah Date: Sat, 16 Oct 2021 21:11:09 -0700 Subject: [PATCH] + Gitpage with hugo For now its pretty barebones that will change v soon --- .gitignore | 2 ++ .gitmodules | 3 ++ gitpage/archetypes/default.md | 6 ++++ gitpage/config.toml | 11 +++++++ gitpage/content/_index.md | 5 +++ gitpage/content/configuration.md | 54 ++++++++++++++++++++++++++++++++ gitpage/themes/dimension | 1 + 7 files changed, 82 insertions(+) create mode 100644 .gitmodules create mode 100644 gitpage/archetypes/default.md create mode 100644 gitpage/config.toml create mode 100644 gitpage/content/_index.md create mode 100644 gitpage/content/configuration.md create mode 160000 gitpage/themes/dimension diff --git a/.gitignore b/.gitignore index 371d02c..0738db3 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ frontend/themes/clippable/static/js/collection.js api/static/js/ api/thumbs/ build/ +gitpage/public/ +gitpage/resources/ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..418c091 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "gitpage/themes/dimension"] + path = gitpage/themes/dimension + url = https://gitlab.com/dspechnikov/dimension-hugo diff --git a/gitpage/archetypes/default.md b/gitpage/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/gitpage/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/gitpage/config.toml b/gitpage/config.toml new file mode 100644 index 0000000..9b929eb --- /dev/null +++ b/gitpage/config.toml @@ -0,0 +1,11 @@ +baseURL = 'https://shockrah.gitlab.io/clippable' +languageCode = 'en-us' +title = 'Clippable' + +theme = "dimension-hugo" + +[params] + author = "shockrah" + description = "A self hostable solution to clip sharing" + copyrightText = "Shockrah" + diff --git a/gitpage/content/_index.md b/gitpage/content/_index.md new file mode 100644 index 0000000..bf941f1 --- /dev/null +++ b/gitpage/content/_index.md @@ -0,0 +1,5 @@ ++++ +title = "Clippable" ++++ + +A self hosted solution to sharing video clips on the internet diff --git a/gitpage/content/configuration.md b/gitpage/content/configuration.md new file mode 100644 index 0000000..e091427 --- /dev/null +++ b/gitpage/content/configuration.md @@ -0,0 +1,54 @@ ++++ +title = "Configuring Clippable" ++++ + +# Environment Variables + +There are only two _optional_ environment variables to configure if +you wish to configure them at all. + +* `CLIPS_DIR` : default = `/media/clips` + +This is the root directory for all clips that you intend on serving; it will have a structure similar to this example one. + +``` +vids +├── funny +│   └── another-clip.mp4 +├── life +└── serious + └── clip.mkv +``` + + +* `THUMBS_DIR`: default = `/media/thumbnails` + +This is the root directory for all clips that you intend on serving; it will have a structure similar to this example one. + +``` +thumbs +├── funny +│   ├── category-thumbnail.jpg +│   └── clip.mkv.jpg +├── life +│   └── category-thumbnail.jpg +└── serious + ├── category-thumbnail.jpg + └── clip.mkv.jpg +``` + +# rocket.toml + +Below is a list of options and their default values in the provided `rocket.toml` file. +This is generally used to configure the webserver itself and not much else. + +|Option |Default Value| +|-------------|--------------| +| address | 0.0.0.0 | +| port | 8482 | +| keep_alive | 5 | +|read_timeout | 5 | +|write_timeout| 5 | +| log | critical | +| limits | {forms=4096} | + diff --git a/gitpage/themes/dimension b/gitpage/themes/dimension new file mode 160000 index 0000000..fa299fa --- /dev/null +++ b/gitpage/themes/dimension @@ -0,0 +1 @@ +Subproject commit fa299fad2698e8b4962102a02f5d02fa2cb227c8