Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature style update #6

Merged
merged 6 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.3
3.2.2
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby 3.1.4
ruby 3.2.2
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -112,7 +112,7 @@ DEPENDENCIES
webrick (~> 1.8)

RUBY VERSION
ruby 3.3.3p89
ruby 3.2.2p53

BUNDLED WITH
2.3.26
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion _layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@

<!-- Wrap is the content to shift when toggling the sidebar. We wrap the
content to avoid any CSS collisions with our real content. -->
<label for="sidebar-checkbox" class="sidebar-toggle"></label>

<div class="wrap">
<div class="masthead">
<div class="container">
<label for="sidebar-checkbox" class="sidebar-toggle"></label>

<h3 class="masthead-title">
{%- if page.path contains '_posts' -%}
Expand Down
59 changes: 45 additions & 14 deletions _posts/2023-05-20-mediaengagement-technical-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.

Expand All @@ -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;
Expand Down Expand Up @@ -523,17 +525,25 @@ After your code is reviewed:
</td>
<td>master
</td>
<td>Accepts merges from Features/Issues and Hotfixes
<td>Accepts merges from Features/Issues, Bugs and Hotfixes
</td>
</tr>
<tr>
<td>Features/Issues
</td>
<td>topic-*
<td>feature-*
</td>
<td>Always branch off HEAD of Working
</td>
</tr>
<tr>
<td>Bug
</td>
<td>bug-*
</td>
<td>Always branch off Working
</td>
</tr>
<tr>
<td>Hotfix
</td>
Expand Down Expand Up @@ -623,25 +633,25 @@ Although likelihood will be less, during the lifespan of the bug development, th
If the branch does not exist yet (check with the Lead), create the branch locally and then push to GitHub. A bug branch should always be 'publicly' available. That is, development should never exist in just one developer's local branch.

```
$ git checkout -b bug-id master // creates a local branch for the new bug
$ git push origin bug-id // makes the new bug remotely available
$ git checkout -b bug-id master // creates a local branch for the new bug
$ git push origin bug-id // makes the new bug remotely available
```

Periodically, changes made to `master` (if any) should be merged back into your bug branch.


```
$ git merge master // merges changes from master into bug branch
$ git merge master // merges changes from master into bug branch
```


When development on the bug is complete, [the Lead] should merge changes into `master` and then make sure the remote branch is deleted.

```
$ git checkout master // change to the master branch
$ git merge --no-ff bug-id // makes sure to create a commit object during merge
$ git push origin master // push merge changes
$ git push origin :bug-id // deletes the remote branch
$ git checkout master // change to the master branch
$ git merge --no-ff bug-id // makes sure to create a commit object during merge
$ git push origin master // push merge changes
$ git push origin :bug-id // deletes the remote branch
```

### Hotfix Branches
Expand All @@ -663,8 +673,8 @@ ___
If the branch does not exist yet (check with the Lead), create the branch locally and then push to GitHub. A hotfix branch should always be 'publicly' available. That is, development should never exist in just one developer's local branch.

```
$ git checkout -b hotfix-id stable // creates a local branch for the new hotfix
$ git push origin hotfix-id // makes the new hotfix remotely available
$ git checkout -b hotfix-id stable // creates a local branch for the new hotfix
$ git push origin hotfix-id // makes the new hotfix remotely available
```

When development on the hotfix is complete, [the Lead] should merge changes into `stable` and then update the tag.
Expand Down Expand Up @@ -1247,3 +1257,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
35 changes: 33 additions & 2 deletions _posts/2023-05-21-mediaengagement.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<details>
<summary><strong>How to configure the proxy</strong></summary>

<ol>
<li>
<p>Create a file named <code>uploads-proxy.conf</code> in the <code>siteRoot/conf/nginx</code> directory with this content:</p>
<pre class="highlight"><code>
location ~ ^/wp-content/uploads/(.*) {
if (!-e $request_filename) {
rewrite ^/wp-content/uploads/(.*) https://mediaengagement.org/wp-content/uploads/$1 redirect;
}
}
</code></pre>
</li>

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

<pre class="highlight"><code>
include uploads-proxy.conf;
</code></pre>

<p>Your updated <code>site.conf.hbs</code> hould look like this screenshot:</p>
<img src="../assets/img/site.conf.hbs-proxy.png" alt="Proxy Configuration Example" style="max-width: 100%; height: auto;">
</li>

<li>Save and restart the site in the Local App.</li>
</ol>
</details>

### Step 5: Sync with GitHub
- Initialize the repository and set the remote origin:
Expand All @@ -72,7 +102,7 @@ Welcome to the CME (Engage) Website documentation. This guide covers everything
git fetch --all
git reset --hard origin/master
```

For more detail see [Technical Docs - Sync with GitHub](mediaengagement-technical-docs/#syncing-with-github)
---

## Local Development
Expand Down Expand Up @@ -110,6 +140,7 @@ npm run production

### Git Usage
- Always create separate branches for new features or bug fixes.
- For more detail see [Technical Docs - Sync with GitHub](/mediaengagement-technical-docs/#git-usage)
- Push to the `master` branch only after code review and testing.

For more detailed Git workflows, see [Deployment Workflow](#deployment-workflow).
Expand Down
26 changes: 13 additions & 13 deletions _sass/minima/_lanyon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ body {
* Center the page content.
*/

.container {
max-width: 28rem;
}
@media (min-width: 38em) {
.container {
max-width: 32rem;
}
}
@media (min-width: 56em) {
.container {
max-width: 38rem;
}
}
// .container {
// max-width: 28rem;
// }
// @media (min-width: 38em) {
// .container {
// max-width: 32rem;
// }
// }
// @media (min-width: 56em) {
// .container {
// max-width: 38rem;
// }
// }


/*
Expand Down
2 changes: 1 addition & 1 deletion _sass/minima/_syntax.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
.highlight .nl { color: #99f } /* Name.Label */
.highlight .nn { color: #0cf; } /* Name.Namespace */
.highlight .nt { color: #2f6f9f; } /* Name.Tag */
.highlight .nv { color: #033 } /* Name.Variable */
.highlight .nv { color: rgb(255, 171, 115) } /* Name.Variable */
.highlight .ow { color: #000; } /* Operator.Word */
.highlight .w { color: #bbb } /* Text.Whitespace */
.highlight .mf { color: #f60 } /* Literal.Number.Float */
Expand Down
Loading
Loading