Skip to content

Commit

Permalink
Merge branch 'release/5.1.11' into v5
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jan 23, 2025
2 parents be19ddd + 0b32172 commit 12fc486
Showing 20 changed files with 1,361 additions and 1,353 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/code-analysis.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Code Analysis

on:
pull_request: null
pull_request:
pull_request_review:
types: [ submitted, edited ]
push:
branches:
- develop-v5
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# SEOmatic Changelog

## 5.1.11 - 2025.01.23
### Changed
* Removed leading spaces from the `robots.txt` template, [though Google ignores whitespace](https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt#syntax)

### Fixed
* Fixed an issue where the Entry Types menu in Content SEO settings would only appear if you had mulitple sites ([#1563](https://github.com/nystudio107/craft-seomatic/issues/1563))

## 5.1.10 - 2025.01.16
### Added
* Added a `ModifySitemapQueryEvent` to allow the modification of the element query used to generate a sitemap ([#1553](https://github.com/nystudio107/craft-seomatic/issues/1553))
200 changes: 100 additions & 100 deletions buildchain/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions buildchain/vite.config.ts
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@ export default defineConfig(({command}) => ({
preserveSymlinks: true,
},
server: {
cors: true, // Allow cross-origin requests -- https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6
fs: {
strict: false
},
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"name": "nystudio107/craft-seomatic",
"description": "SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 5. It is a turnkey SEO system that is comprehensive, powerful, and flexible.",
"type": "craft-plugin",
"version": "5.1.10",
"version": "5.1.11",
"minimum-stability": "dev",
"prefer-stable": true,
"keywords": [
2 changes: 1 addition & 1 deletion docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ SEOmatic is a comprehensive, powerful, and flexible turnkey SEO system that faci
- Various utilities for managing additional meta tags, text excerpts, and more.

::: tip Use Retour for 404 Redirects
SEOmatic _does not_ cover is 404 redirects; for that we recommend our [Retour plugin](https://github.com/nystudio107/craft-retour).
SEOmatic _does not_ handle 404 redirects; for that we recommend our [Retour plugin](https://github.com/nystudio107/craft-retour).
:::

## Used By
629 changes: 280 additions & 349 deletions docs/package-lock.json

Large diffs are not rendered by default.

59 changes: 30 additions & 29 deletions src/controllers/SettingsController.php
Original file line number Diff line number Diff line change
@@ -1208,6 +1208,10 @@ protected function setMultiSiteVariables($siteHandle, &$siteId, array &$variable
protected function setCrumbVariables(array &$variables)
{
$sites = Craft::$app->getSites();
if (!array_key_exists('crumbs', $variables)) {
$variables['crumbs'] = [];
}
// Handle adding in the Sites menu if there are multiple sites
if ($variables['showSites']) {
$siteCrumbItems = [];
$siteGroups = Craft::$app->getSites()->getAllGroups();
@@ -1247,10 +1251,7 @@ protected function setCrumbVariables(array &$variables)
array_push($siteCrumbItems, ...$groupSiteItems);
}
}

if (!array_key_exists('crumbs', $variables)) {
$variables['crumbs'] = [];
}
// Add in the breadcrumbs
$variables['crumbs'] = [
[
'id' => 'language-menu',
@@ -1267,38 +1268,38 @@ protected function setCrumbVariables(array &$variables)
...$variables['crumbs'],
];

if (isset($variables['typeMenu']) && !empty($variables['typeMenu'])) {
$typeCrumbItems = [];
foreach ($variables['typeMenu'] as $key => $value) {
$typeCrumbItems[] = [
'status' => null,
'url' => UrlHelper::url("seomatic/{$variables['controllerHandle']}{$variables['siteHandleUri']}", [
'site' => $variables['currentSiteHandle'],
'typeId' => $key,
]),
'label' => $value,
'selected' => $variables['currentTypeId'] === $key,
];
}
$variables['crumbs'][] =
[
'id' => 'types-menu',
'icon' => 'list',
'label' => $variables['typeMenu'][$variables['currentTypeId']],
'menu' => [
'items' => $typeCrumbItems,
'label' => Craft::t('seomatic', 'Entry Types'),
],
];
}

$variables['sitesMenuLabel'] = Craft::t(
'site',
$sites->getSiteById((int)$variables['currentSiteId'])->name
);
} else {
$variables['sitesMenuLabel'] = '';
}
// Handle adding in the Entry Types menu if there are multiple entry types
if (isset($variables['typeMenu']) && !empty($variables['typeMenu'])) {
$typeCrumbItems = [];
foreach ($variables['typeMenu'] as $key => $value) {
$typeCrumbItems[] = [
'status' => null,
'url' => UrlHelper::url("seomatic/{$variables['controllerHandle']}{$variables['siteHandleUri']}", [
'site' => $variables['currentSiteHandle'],
'typeId' => $key,
]),
'label' => $value,
'selected' => $variables['currentTypeId'] === $key,
];
}
$variables['crumbs'][] =
[
'id' => 'types-menu',
'icon' => 'list',
'label' => $variables['typeMenu'][$variables['currentTypeId']],
'menu' => [
'items' => $typeCrumbItems,
'label' => Craft::t('seomatic', 'Entry Types'),
],
];
}
}

/**
36 changes: 18 additions & 18 deletions src/templates/_frontend/pages/robots.twig
Original file line number Diff line number Diff line change
@@ -5,37 +5,37 @@

{% case "live" %}

# live - don't allow web crawlers to index cpresources/ or vendor/
# live - don't allow web crawlers to index cpresources/ or vendor/

User-agent: *
Disallow: /cpresources/
Disallow: /vendor/
Disallow: /.env
Disallow: /cache/
User-agent: *
Disallow: /cpresources/
Disallow: /vendor/
Disallow: /.env
Disallow: /cache/

{% case "staging" %}

# staging - disallow all
# staging - disallow all

User-agent: *
Disallow: /
User-agent: *
Disallow: /

{% case "local" %}

# local - disallow all
# local - disallow all

User-agent: *
Disallow: /
User-agent: *
Disallow: /

{% default %}

# default - don't allow web crawlers to index cpresources/ or vendor/
# default - don't allow web crawlers to index cpresources/ or vendor/

User-agent: *
Disallow: /cpresources/
Disallow: /vendor/
Disallow: /.env
Disallow: /cache/
User-agent: *
Disallow: /cpresources/
Disallow: /vendor/
Disallow: /.env
Disallow: /cache/

{% endswitch %}

851 changes: 0 additions & 851 deletions src/web/assets/dist/assets/dashboard-7S6CGMhR.js

This file was deleted.

Binary file removed src/web/assets/dist/assets/dashboard-7S6CGMhR.js.gz
Binary file not shown.
1 change: 0 additions & 1 deletion src/web/assets/dist/assets/dashboard-7S6CGMhR.js.map

This file was deleted.

Binary file not shown.
917 changes: 917 additions & 0 deletions src/web/assets/dist/assets/dashboard-Bldjd6r5.js

Large diffs are not rendered by default.

Binary file not shown.
1 change: 1 addition & 0 deletions src/web/assets/dist/assets/dashboard-Bldjd6r5.js.map

Large diffs are not rendered by default.

Binary file not shown.
2 changes: 1 addition & 1 deletion src/web/assets/dist/manifest.json
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
]
},
"src/js/dashboard.js": {
"file": "assets/dashboard-7S6CGMhR.js",
"file": "assets/dashboard-Bldjd6r5.js",
"name": "dashboard",
"src": "src/js/dashboard.js",
"isEntry": true,
Binary file modified src/web/assets/dist/manifest.json.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion src/web/assets/dist/stats.html

Large diffs are not rendered by default.

0 comments on commit 12fc486

Please sign in to comment.