From 700e3bf38fadc190c3a477a8dd4ca648a06b98bc Mon Sep 17 00:00:00 2001 From: Michael Maroszek Date: Fri, 12 Feb 2021 12:21:26 +0100 Subject: [PATCH 1/4] update tags --- common/head_tag.html | 97 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 89 insertions(+), 8 deletions(-) diff --git a/common/head_tag.html b/common/head_tag.html index 8504917..fa6096c 100644 --- a/common/head_tag.html +++ b/common/head_tag.html @@ -1,3 +1,4 @@ + @@ -34,6 +35,9 @@ + @@ -67,6 +71,9 @@ + @@ -79,33 +86,69 @@ + + + + + + + + + + + + @@ -118,6 +161,12 @@ + + @@ -127,6 +176,9 @@ + @@ -139,14 +191,11 @@ - - + + @@ -199,6 +254,15 @@ + + + @@ -223,6 +287,12 @@ + + @@ -232,11 +302,17 @@ + + - + + @@ -337,4 +419,3 @@ - From 0ed15953eb528b07a40675a3ef4b95e583a02521 Mon Sep 17 00:00:00 2001 From: Michael Maroszek Date: Fri, 12 Feb 2021 12:21:46 +0100 Subject: [PATCH 2/4] add bash script for easier updates --- README.md | 14 ++++++-------- update.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 8 deletions(-) create mode 100755 update.sh diff --git a/README.md b/README.md index df99a44..ce7401c 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,10 @@ -# Plugin-Outlets +# Discourse Plugin-Outlets Theme Component -Generated by moving the output of the script below into common/head_tag.html +1. Invoke the update script to regenerate the required files ``` - #!/bin/bash - grep -r plugin-outlet /var/www/discourse/app/|grep name|grep -o -e 'name=".*'|awk -F\" '{print $2}'|sort|uniq | while read p ; do - echo "" - done +./update.sh ``` +2. Push updates into your own fork +3. Install your repository into Discourse via the Admin Panal as a Theme Component + diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..e37d002 --- /dev/null +++ b/update.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Fail fast +set -e + +# Clone or update discourse against current master +echo "Updating discourse..." +if [ -d "discourse" ]; then + cd discourse + git fetch --depth 1 + git reset --hard origin/master + git clean -dfx + cd .. +else + git clone --depth 1 https://github.com/discourse/discourse +fi + +# Build new file with all outlets +echo "Building new outlets file..." +echo "" > common/head_tag.html +grep -r plugin-outlet discourse|grep name|grep -o -e 'name=".*'|awk -F\" '{print $2}'|sort|uniq | while read p ; do + echo "" >> common/head_tag.html +done + +# We are done +echo "Done" \ No newline at end of file From 13a9f0b50844b63b1dc461aaf237b593cf3171bf Mon Sep 17 00:00:00 2001 From: Michael Maroszek Date: Fri, 12 Feb 2021 12:21:51 +0100 Subject: [PATCH 3/4] update gitignore --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c94d134..d9d11ee 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -.discourse-site -HELP +.idea +discourse \ No newline at end of file From 10bbc72d36d3e0ca44647e9acfc1294537318eb5 Mon Sep 17 00:00:00 2001 From: Michael Maroszek Date: Fri, 12 Feb 2021 15:48:48 +0100 Subject: [PATCH 4/4] do not add new line at the beginning --- common/head_tag.html | 1 - update.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/common/head_tag.html b/common/head_tag.html index fa6096c..9c95f6f 100644 --- a/common/head_tag.html +++ b/common/head_tag.html @@ -1,4 +1,3 @@ - diff --git a/update.sh b/update.sh index e37d002..1e58371 100755 --- a/update.sh +++ b/update.sh @@ -17,7 +17,7 @@ fi # Build new file with all outlets echo "Building new outlets file..." -echo "" > common/head_tag.html +echo -n "" > common/head_tag.html grep -r plugin-outlet discourse|grep name|grep -o -e 'name=".*'|awk -F\" '{print $2}'|sort|uniq | while read p ; do echo "