Skip to content

Commit

Permalink
Merge branch 'main' into feat/tup-706-news-on-other-sites
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyboar committed Sep 10, 2024
2 parents e6bdbbf + 4aa175f commit 4f9888b
Show file tree
Hide file tree
Showing 23 changed files with 2,504 additions and 928 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ project_name.var

# Secrets and Customizations
*secrets*.py
*.custom.yml
*settings_custom*.py
*settings_local*.py
custom_app_settings.py
!*.example.py
*.custom.yml
urls_custom.py

# Makefile var
Expand Down
131 changes: 130 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,122 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased][unreleased]

## [4.16.1] - 2023-09-09: Core-Styles v2.33.1

### Updated

* deps: core-styles v2.33.1 by @wesleyboar in https://github.com/TACC/Core-CMS/pull/867

**Full Changelog**: https://github.com/TACC/Core-CMS/compare/v4.16.0...v4.16.1

## [4.16.0] - 2023-09-06: BlueSky Social Media, Footer Enhancements, Fixes

### Added

* feat: secrets.example.py by @wesleyboar in https://github.com/TACC/Core-CMS/pull/861
* feat: add BlueSky icon to logos-social-media by @wesleyboar in 9efb52f, 34ae5d1
* deps: s-footer updates via core-styles 2.33.0 by @wesleyboar in https://github.com/TACC/Core-CMS/pull/866, https://github.com/TACC/Core-CMS/pull/865

### Fixed

* fix: "Fluid Container" should be "Fluid container" by wesleyboar in 06137b7
* fix: LinkedIn icon, more role="img" to SVG by @wesleyboar in 1ba01af

**Full Changelog**: https://github.com/TACC/Core-CMS/compare/v4.15.2...v4.16.0

## [4.15.2] - 2023-09-05: Section via Container Have Corrected Labels

### Fixed

- fix: incorrect text for section containers by @wesleyboar in 8a8a0660

**Full Changelog**: https://github.com/TACC/Core-CMS/compare/v4.15.1...v4.15.2

## [4.15.1] - 2023-09-05: Core-Styles v2.23.1

### Updated

- fix/core-styles-v2-32-1 by @wesleyboar in 763f7e8c

**Full Changelog**: https://github.com/TACC/Core-CMS/compare/v4.15.1...v4.15.2

## [4.15.0] - 2023-09-05: Core-Styles Design Token Colors & Font-Weight Vars

### Added

* enhance: CMD-182 design tokens by @wesleyboar in https://github.com/TACC/Core-CMS/pull/863


**Full Changelog**: https://github.com/TACC/Core-CMS/compare/v4.14.1...v4.15.0

## [4.14.1] - 2023-09-04: News Drop-Cap Without Caption via `.s-drop-cap`

### Fixed

* fix: tup 730 news drop cap should work even if no caption by @wesleyboar in https://github.com/TACC/Core-CMS/pull/864

**Full Changelog**: https://github.com/TACC/Core-CMS/compare/v4.14.0...v4.14.1

## [4.14.0] - 2023-08-07: …ES_ENABLED → …SEARCH_INDEX_IS_AUTOMATIC

### Changed

* enhance: assume local development by @wesleyboar in https://github.com/TACC/Core-CMS/pull/860

### Fixed

* fix: WP-602 `docker compose` with and without dash by @wesleyboar in https://github.com/TACC/Core-CMS/pull/858
* fix: CMD-176 conditional elastic search by @wesleyboar in https://github.com/TACC/Core-CMS/pull/857
* fix: settings_custom BRANDING out of date by @wesleyboar in https://github.com/TACC/Core-CMS/pull/862

### Documented

* docs: deprecate docker-compose by @wesleyboar in https://github.com/TACC/Core-CMS/pull/859

**Full Changelog**: https://github.com/TACC/Core-CMS/compare/v4.13.1...v4.14.0

## [4.13.1] - 2023-07-25: No Error if 2nd-Level Breadcrumb Link is Absent

### Fixed

* fix: CMD-162 error if no second breadcrumb by @wesleyboar in https://github.com/TACC/Core-CMS/pull/855

**Full Changelog**: https://github.com/TACC/Core-CMS/compare/v4.13.0...v4.13.1

## [4.10.2-extra.1] - 2024-07-10: Support `form_name` in `PORTAL_CONF_EMAIL_…`

### Added

* feat: CMD-112 `form_name` in custom email message — off v4.10.2 by @wesleyboar in https://github.com/TACC/Core-CMS/pull/847

**Full Changelog**: https://github.com/TACC/Core-CMS/compare/v4.10.2...v4.10.2-extra.1

## [4.13.0] - 2023-07-24: Easier Customization, Fix Accessibility & Containers

### Added

* feat: CMD-112 `form_name` in custom email message by @wesleyboar in https://github.com/TACC/Core-CMS/pull/846
* FP-1318: Create Section Pattern via Bootstrap Container Plugin by @wesleyboar in https://github.com/TACC/Core-CMS/pull/431
* feat: CMD-164 custom styles via setting by @wesleyboar in https://github.com/TACC/Core-CMS/pull/840
* feat: CMD-165 custom branding via setting by @wesleyboar in https://github.com/TACC/Core-CMS/pull/841

### Fixed

* fix: TUP-725 wrong a11y attribute for links by @wesleyboar in https://github.com/TACC/Core-CMS/pull/844
* fix: CMD-71 svgs not accessible by @wesleyboar in https://github.com/TACC/Core-CMS/pull/845
* fix: custom app with custom url is difficult to debug by @wesleyboar in https://github.com/TACC/Core-CMS/pull/851 and https://github.com/TACC/Core-CMS/pull/852
* fix: WP-407 unable to edit nor create container by @wesleyboar in https://github.com/TACC/Core-CMS/pull/853

## Documented

* docs: CMD-164 CMD-165 custom assets via settings by @wesleyboar in https://github.com/TACC/Core-CMS/pull/843

### Security

* chore(deps): bump ws and socket.io-client by @dependabot in https://github.com/TACC/Core-CMS/pull/848

**Full Changelog**: https://github.com/TACC/Core-CMS/compare/v4.12.0...v4.13.0

## [4.12.0] - 2023-06-03: Rename Settings, Disable 2nd Breadcrumb, Fix Old News

> **Warning**
Expand All @@ -25,6 +141,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [4.11.1] - 2024-06-26: Can Disable ES, Fix Hidden Nav, LDAP Requires Portal

> **Warning**
> The "Can Disable ES" feature is broken. Use v[4.14.0] for similar feature.
### Added

* feat: support disabling elasticsearch by @wesleyboar in https://github.com/TACC/Core-CMS/pull/834
Expand Down Expand Up @@ -1253,10 +1372,20 @@ formerly known as v2.5.2 published on Thu Jul 1 16:10:38 2021 -0500

v2.0.0 Production release as of Mar 31, 2021.

[unreleased]: https://github.com/TACC/Core-CMS/compare/v4.12.0...main
[unreleased]: https://github.com/TACC/Core-CMS/compare/v4.16.1...main
[4.16.1]: https://github.com/TACC/Core-CMS/releases/tag/v4.16.1
[4.16.0]: https://github.com/TACC/Core-CMS/releases/tag/v4.16.0
[4.15.2]: https://github.com/TACC/Core-CMS/releases/tag/v4.15.2
[4.15.1]: https://github.com/TACC/Core-CMS/releases/tag/v4.15.1
[4.15.0]: https://github.com/TACC/Core-CMS/releases/tag/v4.15.0
[4.14.1]: https://github.com/TACC/Core-CMS/releases/tag/v4.14.1
[4.14.0]: https://github.com/TACC/Core-CMS/releases/tag/v4.14.0
[4.13.1]: https://github.com/TACC/Core-CMS/releases/tag/v4.13.1
[4.13.0]: https://github.com/TACC/Core-CMS/releases/tag/v4.13.0
[4.12.0]: https://github.com/TACC/Core-CMS/releases/tag/v4.12.0
[4.11.1]: https://github.com/TACC/Core-CMS/releases/tag/v4.11.1
[4.11.0]: https://github.com/TACC/Core-CMS/releases/tag/v4.11.0
[4.10.2-extra.1]: https://github.com/TACC/Core-CMS/releases/tag/v4.10.2-extra.1
[4.10.2]: https://github.com/TACC/Core-CMS/releases/tag/v4.10.2
[4.10.1]: https://github.com/TACC/Core-CMS/releases/tag/v4.10.1
[4.10.0]: https://github.com/TACC/Core-CMS/releases/tag/v4.10.0
Expand Down
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ DOCKERHUB_REPO := taccwma/$(shell cat ./docker_repo.var)
DOCKER_TAG ?= $(shell git rev-parse --short HEAD)
DOCKER_IMAGE := $(DOCKERHUB_REPO):$(DOCKER_TAG)
DOCKER_IMAGE_LATEST := $(DOCKERHUB_REPO):latest
# WARNING: Using `docker-compose` is deprecated
DOCKER_COMPOSE_CMD := $(shell if command -v docker-compose > /dev/null; then echo "docker-compose"; else echo "docker compose"; fi)

# NOTE: The `DOCKER_IMAGE_BRANCH` tag is the git tag for the commit if it exists, else the branch on which the commit exists.
# NOTE: Special characters in `DOCKER_IMAGE_BRANCH` are replaced with dashes.
Expand All @@ -13,7 +15,7 @@ BUILD_ID := $(shell git describe --always)

.PHONY: build
build:
docker-compose -f ./docker-compose.yml build
$(DOCKER_COMPOSE_CMD) -f ./docker-compose.yml build

.PHONY: build-full
build-full:
Expand All @@ -28,7 +30,7 @@ build-full:

.PHONY: example
example:
docker-compose -f ./docker-compose.example.yml up
$(DOCKER_COMPOSE_CMD) -f ./docker-compose.example.yml up

.PHONY: publish
publish:
Expand All @@ -42,12 +44,12 @@ publish-latest:

.PHONY: start
start:
docker-compose -f docker-compose.yml up
$(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml up

.PHONY: stop
stop:
docker-compose -f docker-compose.yml down
$(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml down

.PHONY: stop-verbose
stop-v:
docker-compose -f docker-compose.yml down -v
$(DOCKER_COMPOSE_CMD) -f docker-compose.dev.yml down -v
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,24 @@ Set up a new local CMS instance.
cd Core-CMS
```

2. Add Core CMS Settings:
2. Add Core CMS Settings & Secrets:

Create a `taccsite_cms/settings_local.py` with content from `settings_local.example.py`, e.g.
Create a `taccsite_cms/*.py` for every `*.example.py`, e.g.

```sh
cp taccsite_cms/settings_custom.example.py taccsite_cms/settings_custom.py
cp taccsite_cms/secrets.example.py taccsite_cms/secrets.py
cp taccsite_cms/settings_local.example.py taccsite_cms/settings_local.py
```

3. Build & Start the Docker Containers:

| For Testing | For Developing & Testing |
| - | - |
| `make start` | `docker-compose -f ./docker-compose.dev.yml up` |
```sh
make start
```

> **Note**
> This will make the terminal window busy. To run commands after this, **either** open a new terminal window **or** run `docker-compose -f ./docker-compose.dev.yml up --detach` instead.
> This will make the terminal window busy. To run commands after this, **either** open a new terminal window **or** run `docker compose -f ./docker-compose.dev.yml up --detach` instead.

4. Enter the CMS Docker Container:

Expand Down Expand Up @@ -122,25 +124,27 @@ Read [Upgrade Project] for developer instructions.

### New Minor or Patch Version (or Branch)

#### For Testing

```sh
make stop
make build
make start
```

#### For Developing & Testing
<details><summary>Advanced</summary>

To only update as necessary, or update since uncommon changes:

| | If this changed | Run this command |
| - | - | - |
| 0 | Dockerfile | `make build` then re-start the container |
| 0 | Dockerfile | `make stop`, `make build`, `make start` |
| 1 | Python models | `docker exec -it core_cms sh -c "python manage.py migrate"` |
| 2 | Node dependencies | `npm ci` |
| 3 | CSS stylesheets | `npm run build:css` |
| 4 | UI Demo | `npm run build:ui-demo` |
| 5 | Assets e.g.<br><sub>images, stylesheets, JavaScript, UI demo</sub> | `docker exec -it core_cms sh -c "python manage.py collectstatic --no-input"` |

</details>

## Develop Project

Read [Django CMS User Guide] for CMS user instructions.
Expand Down
8 changes: 5 additions & 3 deletions docs/develop-custom-project.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Develop a Custom Project

| You can customize these features | via this repository | (status) |
| You can do these actions | via this resource | (status) |
| - | - | - |
| templates, static assets, settings, custom apps, URLs, middleware | [Core-CMS-Custom](#via-core-cms-custom) | active |
| templates, static assets, settings | [Core-CMS-Resources](#via-core-cms-resources) | deprecated |
| **customize** templates, static assets, settings, custom apps, URLs, middleware | [Core-CMS-Custom](#via-core-cms-custom) | active |
| **customize** templates, static assets, settings | [Core-CMS-Resources](#via-core-cms-resources) | deprecated |
| **create** custom apps | [Django-App](https://github.com/TACC/Django-App) | active |
| **create** forked apps e.g. [TACC/djangocms-forms](https://github.com/TACC/djangocms-forms) | ["Fork a repo"](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) | evergreen |

## via [Core CMS Custom]

Expand Down
82 changes: 82 additions & 0 deletions docs/upgrade-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,94 @@

## Table of Contents

- [from v4.N to v4.14](#from-v4n-to-v414)
- [from v4.N to v4.13](#from-v4n-to-v413)
- [from v4.N to v4.12](#from-v4n-to-v412)
- [from v4.N to v4.7](#from-v4n-to-v47)
- [from v3 to v4](#from-v3-to-v4)
- [from v3.N to v3.12](#from-v3n-to-v312)
- [from v2 to v3](#from-v2-to-v3)

## from v4.N to v4.14

- [Rename `PORTAL_ES_ENABLED` Setting](#rename-portal_es_enabled-settings)
- [Upgrade Docker Compose](#upgrade-docker-compose)

### Rename `PORTAL_ES_ENABLED` Setting

| from | to |
| - | - |
| `PORTAL_ES_ENABLED` | `PORTAL_SEARCH_INDEX_IS_AUTOMATIC` |

### Upgrade Docker Compose

Update to _at least_ the latest Docker Compose v2.

The v1 `docker-compose` command has long been deprecated.

## from v4.N to v4.13

- [Upgrade Custom Branding Setting](#upgrade-custom-logo-setting)

### Upgrade Custom Branding Setting

Refactor the `BRANDING` array to a `PORTAL_BRANDING` dict:

```diff
- NSF_BRANDING = [
- ...
- ]
-
- TACC_BRANDING = [
- ...
- ]
-
- UTEXAS_BRANDING = [
- ...
- ]
-
- CUSTOM_BRANDING = [
- "portal",
- "custom-project_cms/img/org_logos/custom-project-logo.png",
- "",
- "/",
- "_self",
- "Custom Project Logo",
- "anonymous",
- "True"
- ]
-
- BRANDING = [ NSF_BRANDING, TACC_BRANDING, UTEXAS_BRANDING, CUSTOM_BRANDING ]
+ from taccsite_cms._settings.branding import *
+
+ CUSTOM_BRANDING = {
+ "is_remote": True,
+ "img_file_src": "https://cdn.jsdelivr.net/gh/TACC/Core-CMS-Custom@______/custom-project_assets/custom-project-logo.png",
+ "img_class": "", # additional class names
+ "link_href": "/",
+ "link_target": "_self",
+ "img_alt_text": "Portal Logo",
+ "img_crossorigin": "anonymous",
+ } # To hide logo, set `PORTAL_LOGO = False`
+
+ PORTAL_BRANDING = [ PORTAL_BRANDING_TACC, PORTAL_BRANDING_UTEXAS ]
```

<details><summary>Map of Array Values to Dict Properties</summary>

| | from Array Value | to Dict Property |
| - | - | - |
| 0 | "portal" | (unused value) |
| 1 | "site_cms/.../portal.png" | `"img_file_src"` |
| 2 | "" | `"img_class"` |
| 3 | "/" | `"link_href"` |
| 4 | "_self" | `"link_target"` |
| 5 | "Portal Logo" | `"img_alt_text"` |
| 6 | "anonymous" | `"img_crossorigin"` |
| 7 | "True" | (whether to show logo) |

</details>

## from v4.N to v4.12

- [Rename Certain Settings](#rename-certain-settings)
Expand Down
Loading

0 comments on commit 4f9888b

Please sign in to comment.