This is the VuePress backend data ("source code") for the Using Python Training Series Official Website.
The website is at expertmultimedia.com/usingpython.
These instructions are for making "sites" that are subdirectories of the main website. For making VuePress the root of your website (to make the domain go to the VuePress static html), you can find some tips in the guide, but you will have to change the commands.
- See poikilos.org/use-vuepress-to-build-static-html-files to setup the repository.
(These instructions assume that you have cloned the repo as described in the poikilos.org article.)
- Go to the server console and run:
# cd $WWW_HOME
# wget -O vuepress-vars-expertmm-subdirs.rc https://raw.githubusercontent.com/poikilos/usingpython-website/main/doc/HOME/vuepress-vars-expertmm-subdirs.rc
#
# For help with the meaning of the variables, see the article.
cd $WWW_HOME/$MAINSITE-meta/$SUBDIR-meta
-
Edit the vuepress-vars-expertmm-subdirs.rc file according to the following instructions (the example for this site assumes you are using Mail-in-a-Box, so that is why the following differ so much from the example file):
WWW_USER
is usuallywww-data
WWW_GROUP
is usuallywww-data
WWW_HOME
is usually/var/www
MAINSITE
is the name of your site (subdirectory under$WWW_HOME
), usuallyhtml
PUBLIC_HTML
is usually$WWW_HOME/$MAINSITE
SUBDIR_REPO
is the name of your repository with the following at the base of the repo (or of an existing blank repository before you follow the instructions in the article):src/.vuepress
package.json
-
Change
WWW_USER
andSUBDIR
in the instructions below.
-
Edit the page on GitHub.
-
Change to the www user.
WWW_USER=user-data
sudo su $WWW_USER -s /bin/bash
Beyond the scope of this VuePress instance, the dev computer requires steps to make "Resources" (https://expertmultimedia.com/usingpython-old) available:
cd www/expertmultimedia/usingpython-old
# ^ Also contains config.php for github.com/Poikilos/directory-listing
./push-usingpython.sh
# ^ Also remotely clones github.com/Poikilos/directory-listing
# and remotely adds index.php to remote folder
- Resources folders such as the py3resources subdirectory on the remote site are linked using absolute links from the included md files.
- Export html as the www user.
SUBDIR=usingpython
source vuepress-vars-expertmm-subdirs.rc $SUBDIR
cd $WWW_HOME/$MAINSITE-meta/$SUBDIR-meta
git pull
yarn
# suggested by vuepress build:
# npx browserslist@latest --update-db
# suggested by above command:
npx update-browserslist-db@latest
./export-html.sh
"ERROR: There are no scenarios; must have at least one." This indicates that the yarn command is an entirely different program than expected!
Therefore:
sudo apt remove cmdtest
- "You've got the wrong
yarn
"
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install yarn