Merge pull request #18 from linuxserver/content-path

This commit is contained in:
Adam 2023-04-21 19:08:44 +01:00 committed by GitHub
commit 29a6c4fc45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 14 deletions

View File

@ -231,6 +231,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **21.04.23:** - Fix for upstream changes. Content now needs to be placed in /config/content/pages.
* **18.01.23:** - Rebase to Alpine 3.17, migrate to s6v3.
* **10.08.22:** - Rebasing to alpine 3.15.
* **23.01.21:** - Rebasing to alpine 3.13.

View File

@ -42,6 +42,7 @@ app_setup_block: |
# changelog
changelogs:
- { date: "21.04.23:", desc: "Fix for upstream changes. Content now needs to be placed in /config/content/pages." }
- { date: "18.01.23:", desc: "Rebase to Alpine 3.17, migrate to s6v3." }
- { date: "10.08.22:", desc: "Rebasing to alpine 3.15." }
- { date: "23.01.21:", desc: "Rebasing to alpine 3.13." }

View File

@ -68,7 +68,7 @@ var config = {
content_dir : '/config/content/',
// Where is the public directory or document root?
public_dir : '/app/raneto/themes/default/public',
public_dir: path.join(theme_dir, theme_name, 'public'),
// The base URL of your images folder,
// Relative to config.public_dir
@ -165,7 +165,6 @@ var config = {
menu_on_pages: true,
menu_on_page_collapsible: true,
};
config.public_dir = '/app/raneto/themes/default/public';
// Exports
module.exports = config;

View File

@ -11,7 +11,7 @@ var raneto = require('./app/index.js');
// Then, we load our configuration file
// This can be done inline, with a JSON file,
// or with a Node.js module as we do below.
var config = require('./config/config.default.js');
var config = require('/config/config.default.js');
// Finally, we initialize Raneto
// with our configuration object

View File

@ -1,19 +1,22 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
# make directories if necessary
mkdir -p /config/content
folders=(
/app/raneto/node_modules/@raneto/theme-default/dist/public/images
/app/raneto/content
)
i=/app/raneto/themes/default/public/images
if [[ -e "$i" && ! -L "$i" && -e /config/"$(basename "$i")" ]]; then
rm -Rf "$i" && \
ln -s /config/"$(basename "$i")" "$i"
fi
for i in "${folders[@]}"; do
if [[ -e "$i" && ! -L "$i" && -e /config/"$(basename "$i")" ]]; then
rm -Rf "$i" && \
ln -s /config/"$(basename "$i")" "$i"
fi
if [[ -e "$i" && ! -L "$i" ]]; then
mv "$i" /config/"$(basename "$i")" && \
ln -s /config/"$(basename "$i")" "$i"
fi
if [[ -e "$i" && ! -L "$i" ]]; then
mv "$i" /config/"$(basename "$i")" && \
ln -s /config/"$(basename "$i")" "$i"
fi
done
# create local user server files
if [[ ! -f /config/config.default.js ]]; then