Fixed bug that added multiple canonicals in SDC (#16160)

Fixed error that added multiple canonical links in the Spatial Data Catalog
pull/16162/head
Alberto Acuña 4 years ago committed by GitHub
parent 7b6466528b
commit e2fc6d8f32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -71,6 +71,7 @@ sudo make install
- Updated robots.txt to allow Google access to our datasets [#16148](https://github.com/CartoDB/cartodb/pull/16148)
- In the Data Catalog, fixed baseurl as it added an extra `/` on the queries from public pages [#16148](https://github.com/CartoDB/cartodb/pull/16148)
- Added dynamic meta title and canonical link to improve SEO in public pages for the Spatial Data Catalog [#16157](https://github.com/CartoDB/cartodb/pull/16157)
- Fixed error that added multiple canonical links in the Spatial Data Catalog [#16160](https://github.com/CartoDB/cartodb/pull/16160)
4.44.0 (2020-11-20)
-------------------

@ -71,10 +71,15 @@ router.beforeEach((to, _, next) => {
});
function addCanonical (canonicalUrl) {
const link = document.createElement('link');
link.setAttribute('rel', 'canonical');
link.setAttribute('href', canonicalUrl);
document.head.appendChild(link);
const canonicalLink = document.head.querySelector('link[rel="canonical"]');
if (canonicalLink) {
canonicalLink.setAttribute('href', canonicalUrl);
} else {
const link = document.createElement('link');
link.setAttribute('rel', 'canonical');
link.setAttribute('href', canonicalUrl);
document.head.appendChild(link);
}
}
router.afterEach(to => {

2
package-lock.json generated

@ -1,6 +1,6 @@
{
"name": "cartodb-ui",
"version": "1.0.0-assets.224",
"version": "1.0.0-assets.225",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -1,6 +1,6 @@
{
"name": "cartodb-ui",
"version": "1.0.0-assets.224",
"version": "1.0.0-assets.225",
"description": "CARTO UI frontend",
"repository": {
"type": "git",

@ -75,11 +75,11 @@ steps:
- -cx
- |
docker pull gcr.io/cartodb-on-gcp-main-artifacts/builder:${_BRANCH_TAG}
if [ ! -z "$?" ]
then
if [ $? -ne 0 ]
then
docker pull gcr.io/cartodb-on-gcp-main-artifacts/builder:latest
docker tag gcr.io/cartodb-on-gcp-main-artifacts/builder:latest gcr.io/cartodb-on-gcp-main-artifacts/builder:${_BRANCH_TAG}
fi
fi
docker build --build-arg COMPILE_ASSETS=false --build-arg BUNDLE_JOBS=16 -t gcr.io/cartodb-on-gcp-main-artifacts/builder:current -t gcr.io/cartodb-on-gcp-main-artifacts/builder:${_BRANCH_TAG} -t gcr.io/cartodb-on-gcp-main-artifacts/builder:${SHORT_SHA} -t gcr.io/cartodb-on-gcp-main-artifacts/builder:${_BRANCH_TAG}--${SHORT_SHA} --cache-from gcr.io/cartodb-on-gcp-main-artifacts/builder:${_BRANCH_TAG} .
# Run tests

@ -75,8 +75,8 @@ steps:
- -cx
- |
docker pull gcr.io/cartodb-on-gcp-main-artifacts/builder:${_BRANCH_TAG}
if [ ! -z "$?" ]
then
if [ $? -ne 0 ]
then
docker pull gcr.io/cartodb-on-gcp-main-artifacts/builder:latest
docker tag gcr.io/cartodb-on-gcp-main-artifacts/builder:latest gcr.io/cartodb-on-gcp-main-artifacts/builder:${_BRANCH_TAG}
fi
@ -102,7 +102,7 @@ steps:
- name: gcr.io/cloud-builders/docker
args: ['exec', '-i', 'builder_1', 'bash', '-c', '/cartodb/runParallelTests.sh 24' ]
timeout: 2700s
timeout: 3000s
substitutions:
_BRANCH_TAG: ${BRANCH_NAME//\//-}

Loading…
Cancel
Save