diff --git a/.ruby-version b/.ruby-version index 619b537..be94e6f 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.3 +3.2.2 diff --git a/.tool-versions b/.tool-versions index 306ab33..f2a971a 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -ruby 3.1.4 +ruby 3.2.2 diff --git a/Gemfile.lock b/Gemfile.lock index c882319..d0deb8d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -62,13 +62,13 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.4.0) - mini_portile2 (2.8.7) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - nokogiri (1.15.2) - mini_portile2 (~> 2.8.2) + nokogiri (1.15.2-arm64-darwin) + racc (~> 1.4) + nokogiri (1.15.2-x86_64-linux) racc (~> 1.4) pathutil (0.16.2) forwardable-extended (~> 2.6) @@ -112,7 +112,7 @@ DEPENDENCIES webrick (~> 1.8) RUBY VERSION - ruby 3.3.3p89 + ruby 3.2.2p53 BUNDLED WITH 2.3.26 diff --git a/_config.yml b/_config.yml index d049bcd..ef21703 100644 --- a/_config.yml +++ b/_config.yml @@ -55,7 +55,7 @@ defaults: # TOC Default Configuration toc: min_level: 1 - max_level: 2 + max_level: 3 no_toc_section_class: no_toc_section list_id: toc list_class: section-nav diff --git a/_posts/2023-05-20-mediaengagement-technical-docs.md b/_posts/2023-05-20-mediaengagement-technical-docs.md index beb3d43..0cbbd22 100644 --- a/_posts/2023-05-20-mediaengagement-technical-docs.md +++ b/_posts/2023-05-20-mediaengagement-technical-docs.md @@ -37,7 +37,9 @@ It might be a little overwhelming at first, but after a couple of weeks, things ### 2. Import .zip -- Request the lead dev to export a "slimmer" version of the site. This will be a .zip file you can import into your Local App. +> Windows users need to run the Local app as an administrator. Right-click on the Local app icon and select "Run as administrator" to open the app. + +- Request the lead dev to [export a "slimmer" version](#export-from-local-app) of the site. This will be a .zip file you can import into your Local App. - In the Local App click the plus (+) icon in the bottom left @@ -65,7 +67,7 @@ Create a `config.json` file in the root of your theme (ex.`/themes/engage-2-x/co Replace `localhost:10000` with the local URL in the Local App / Overview / Site host. -### 4. Proxy Requests for `/wp-content/uploads/` to the Production Site +### 4. Proxy Image Requests This will save you storage on your machine because all images will be fetched from the live site. @@ -79,7 +81,7 @@ This will save you storage on your machine because all images will be fetched fr } ``` -2. Open `siteRoot/conf/nginx/site.conf.hbs` in your editor and add the below snippet below the `{{/unless}}` line in the `# WordPress Rules`: +2. Open `siteRoot/conf/nginx/site.conf.hbs` in your editor and add the below snippet below the "{{/unless}}" line in the `# WordPress Rules`: ``` include uploads-proxy.conf; @@ -1247,3 +1249,24 @@ If you want to optimize specific tables only, you can do so by running a SQL que ```bash wp db query "OPTIMIZE TABLE wp_posts, wp_postmeta, wp_usermeta, wp_options;" ``` + +## Get WordPress Info + +WP Sidebar > Site Health > Info Tab + +# Lead Notes + +## Export from Local App + +To export a slimmer version of the site you first need to export your main site and import is into Local as a new site. This new site is the site you will remove files from to "slim" it down. Then you can export the new site and send the zip to the new undergrads. + +**Delete these files & folders** + +Before you export the new duplicate local site you need to delete these: + +- siteRoot/app/public/.git +- siteRoot/app/public/wp-content/themes/engage-2-x/node_modules +- any vs code *.code-workspace files +- all .* files in siteRoot/app/public/ +- siteRoot/app/public/enp-quiz-database-config.php +- siteRoot/app/public/LocalValetDriver.php diff --git a/_posts/2023-05-21-mediaengagement.md b/_posts/2023-05-21-mediaengagement.md index 19eb22b..554e0f6 100644 --- a/_posts/2023-05-21-mediaengagement.md +++ b/_posts/2023-05-21-mediaengagement.md @@ -62,7 +62,37 @@ Welcome to the CME (Engage) Website documentation. This guide covers everything ``` ### Step 4: Proxy Requests for `/wp-content/uploads/` -- Set up a proxy to save local storage by fetching images from the live site. +- Set up a proxy to save storage on you local machine by fetching images from the live/production site. If this step is not completed your local site willnot show any images. + +
+ How to configure the proxy + +
    +
  1. +

    Create a file named uploads-proxy.conf in the siteRoot/conf/nginx directory with this content:

    +
    
    +location ~ ^/wp-content/uploads/(.*) {
    +    if (!-e $request_filename) {
    +        rewrite ^/wp-content/uploads/(.*) https://mediaengagement.org/wp-content/uploads/$1 redirect;
    +    }
    +}
    +      
    +
  2. + +
  3. +

    Open siteRoot/conf/nginx/site.conf.hbs in your editor and add the below snippet below the {{/unless}} line in the `# WordPress Rules`:

    + +
    
    +  include uploads-proxy.conf;
    +      
    + +

    Your updated site.conf.hbs hould look like this screenshot:

    + Proxy Configuration Example +
  4. + +
  5. Save and restart the site in the Local App.
  6. +
+
### Step 5: Sync with GitHub - Initialize the repository and set the remote origin: diff --git a/assets/img/site.conf.hbs-proxy.png b/assets/img/site.conf.hbs-proxy.png new file mode 100644 index 0000000..410d40f Binary files /dev/null and b/assets/img/site.conf.hbs-proxy.png differ