Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wowchemy/starter-academic.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Cushen <gcushen@users.noreply.github.com>2019-10-09 20:47:32 +0300
committerGeorge Cushen <gcushen@users.noreply.github.com>2019-10-09 20:47:32 +0300
commit4c014375e1a99c146e443c5ac24c6d21490e57ee (patch)
tree0a5c8076dfe1b950c9bf48fc17bfdb4c147353a3
parent1a195d83b703339908861064f23b223099907851 (diff)
feat: add Forestry.io integration
-rw-r--r--.forestry/front_matter/templates/blog-post.yml50
-rw-r--r--.forestry/front_matter/templates/event.yml71
-rw-r--r--.forestry/settings.yml56
l---------config.toml1
-rw-r--r--content/home/demo.md5
-rw-r--r--content/home/hero.md5
m---------themes/academic0
-rwxr-xr-xupdate_academic.sh40
8 files changed, 204 insertions, 24 deletions
diff --git a/.forestry/front_matter/templates/blog-post.yml b/.forestry/front_matter/templates/blog-post.yml
new file mode 100644
index 00000000..369fcb8f
--- /dev/null
+++ b/.forestry/front_matter/templates/blog-post.yml
@@ -0,0 +1,50 @@
+---
+label: Blog post
+hide_body: false
+fields:
+- type: text
+ name: title
+ label: title
+- type: text
+ name: subtitle
+ label: subtitle
+- type: datetime
+ name: date
+ label: date
+- type: list
+ name: authors
+ label: authors
+- type: list
+ name: tags
+ label: tags
+- type: text
+ name: summary
+ label: summary
+- type: field_group
+ name: image
+ label: image
+ fields:
+ - type: number
+ name: placement
+ label: placement
+ - type: text
+ name: caption
+ label: caption
+ - type: text
+ name: focal_point
+ label: focal_point
+ description: Image Focal Point (Smart, Center, TopLeft, Top, TopRight, Left, Right,
+ BottomLeft, Bottom, BottomRight)
+- name: projects
+ type: list
+ config:
+ use_select: false
+ min:
+ max:
+ label: projects
+ description: Associate this content with a project by entering a project folder
+ name
+- name: featured
+ type: boolean
+ label: featured
+ description: You can filter by featured content on your homepage
diff --git a/.forestry/front_matter/templates/event.yml b/.forestry/front_matter/templates/event.yml
new file mode 100644
index 00000000..f4943c0c
--- /dev/null
+++ b/.forestry/front_matter/templates/event.yml
@@ -0,0 +1,71 @@
+---
+label: Event
+hide_body: true
+fields:
+- type: text
+ name: title
+ label: title
+- name: subtitle
+ type: text
+ config:
+ required: false
+ label: subtitle
+- type: text
+ name: event
+ label: event
+ description: Name of the event (e.g. Academic Conference)
+- type: text
+ name: event_url
+ label: Event Link
+- type: text
+ name: location
+ label: location
+- type: datetime
+ name: publishDate
+ label: publishDate
+ description: When to publish this page (choose today)
+- type: datetime
+ name: date
+ label: date
+ description: Start time
+- type: datetime
+ name: date_end
+ label: date_end
+ description: End time
+- type: boolean
+ name: all_day
+ label: all_day
+- type: list
+ name: authors
+ label: Presenters
+- type: textarea
+ name: abstract
+ label: abstract
+- type: text
+ name: url_slides
+ label: url_slides
+- type: text
+ name: url_video
+ label: url_video
+- type: text
+ name: url_code
+ label: url_code
+- type: field_group
+ name: image
+ label: image
+ fields:
+ - type: number
+ name: placement
+ label: placement
+ - type: text
+ name: caption
+ label: caption
+ - type: text
+ name: focal_point
+ label: focal_point
+ description: Image Focal Point (Smart, Center, TopLeft, Top, TopRight, Left, Right,
+ BottomLeft, Bottom, BottomRight)
+- name: featured
+ type: boolean
+ label: featured
+ description: You can filter by featured content on your homepage
diff --git a/.forestry/settings.yml b/.forestry/settings.yml
new file mode 100644
index 00000000..eaa45d3b
--- /dev/null
+++ b/.forestry/settings.yml
@@ -0,0 +1,56 @@
+---
+new_page_extension: md
+auto_deploy: false
+admin_path:
+webhook_url:
+sections:
+- type: directory
+ path: content/home
+ label: Home
+ create: all
+ match: "**/*"
+- type: directory
+ path: content/post
+ label: Blog posts
+ create: all
+ match: "**/*"
+ templates:
+ - blog-post
+- type: directory
+ path: content/project
+ label: Projects
+ create: all
+ match: "**/*"
+- type: directory
+ path: content/talk
+ label: Events
+ create: all
+ match: "**/*"
+ templates:
+ - event
+- type: directory
+ path: content/publication
+ label: Publications
+ create: all
+ match: "**/*"
+- type: directory
+ path: content
+ label: Pages
+ create: all
+ match: "*"
+upload_dir: static/img
+public_path: "/img"
+front_matter_path: ''
+use_front_matter_path: false
+file_template: ":filename:"
+build:
+ preview_env:
+ - HUGO_ENV=staging
+ - HUGO_VERSION=0.58.2
+ preview_output_directory: public
+ preview_docker_image: forestryio/hugo:latest
+ mount_path: "/srv"
+ working_dir: "/srv"
+ instant_preview_command: hugo server -D -E -F --port 8080 --bind 0.0.0.0 --renderToDisk
+ -d public
+version: 0.58.2
diff --git a/config.toml b/config.toml
new file mode 120000
index 00000000..abf509f0
--- /dev/null
+++ b/config.toml
@@ -0,0 +1 @@
+./config/_default/config.toml \ No newline at end of file
diff --git a/content/home/demo.md b/content/home/demo.md
index cbd5cc6e..54800cf9 100644
--- a/content/home/demo.md
+++ b/content/home/demo.md
@@ -31,7 +31,10 @@ subtitle = ""
# Background image.
# image = "image.jpg" # Name of image in `static/img/`.
# image_darken = 0.6 # Darken the image? Range 0-1 where 0 is transparent and 1 is opaque.
-
+ # image_size = "cover" # Options are `cover` (default), `contain`, or `actual` size.
+ # image_position = "center" # Options include `left`, `center` (default), or `right`.
+ # image_parallax = true # Use a fun parallax-like fixed background effect? true/false
+
# Text color (true=light or false=dark).
text_color_light = true
diff --git a/content/home/hero.md b/content/home/hero.md
index 7f57c233..0b80ddad 100644
--- a/content/home/hero.md
+++ b/content/home/hero.md
@@ -26,7 +26,10 @@ hero_media = "hero-academic.png"
# Background image.
# image = "" # Name of image in `static/img/`.
# image_darken = 0.6 # Darken the image? Range 0-1 where 0 is transparent and 1 is opaque.
-
+ # image_size = "cover" # Options are `cover` (default), `contain`, or `actual` size.
+ # image_position = "center" # Options include `left`, `center` (default), or `right`.
+ # image_parallax = true # Use a fun parallax-like fixed background effect? true/false
+
# Text color (true=light or false=dark).
text_color_light = true
diff --git a/themes/academic b/themes/academic
-Subproject 3911b8ff5327a8f703bd88d2c53db1c116b7561
+Subproject d8e90e9d649c6ce86eb0b71ad20b6c495329817
diff --git a/update_academic.sh b/update_academic.sh
index a59f5b6b..74ace43e 100755
--- a/update_academic.sh
+++ b/update_academic.sh
@@ -12,15 +12,26 @@ if [ ! -d .git ]; then
exit 1;
fi
+function view_update () {
+ echo -e "Checking for updates...\n"
+ cd themes/academic
+ git fetch
+ git log --pretty=oneline --abbrev-commit --decorate HEAD..origin/master
+ cd ../../
+}
+
# Function to update Academic
-function install_update () {
+function do_update () {
# Apply any updates
git submodule update --remote --merge
# - Update Netlify.toml with required Hugo version
if [ -f ./netlify.toml ]; then
- version=$(sed -n 's/^min_version = //p' themes/academic/theme.toml)
- sed -i '' -e "s/HUGO_VERSION = .*/HUGO_VERSION = $version/g" ./netlify.toml
+ # Postfix '.0' to Hugo min_version as sadly it doesn't map to a precise semantic version.
+ version=$(sed -n 's/^min_version = //p' themes/academic/theme.toml | tr -d '"')
+ version="${version}.0"
+ echo "Set Netlify Hugo version to v${version}"
+ sed -i '' -e "s/HUGO_VERSION = .*/HUGO_VERSION = \"$version\"/g" ./netlify.toml
fi
echo
@@ -34,22 +45,7 @@ version=$(sed -n 's/^version = "//p' themes/academic/data/academic.toml)
echo -e "Source Themes Academic v$version\n"
# Display available updates
-echo -e "Checking for updates...\n"
-cd themes/academic
-git fetch
-git log --pretty=oneline --abbrev-commit --decorate HEAD..origin/master
-cd ../../
-
-title="Do you wish to install the above updates?"
-prompt="Choose an option and press Enter:"
-options=("Yes" "No")
-
-echo "$title"
-PS3="$prompt "
-select opt in "${options[@]}"; do
- case $opt in
- Yes ) install_update; break;;
- No ) break;;
- * ) break;;
- esac
-done
+view_update
+
+# Apply any updates
+do_update