From 14d1fb3161497bff3eb293abb8fd34e713756b3f Mon Sep 17 00:00:00 2001 From: H Parra Date: Mon, 9 Dec 2024 14:19:35 -0800 Subject: [PATCH] delete existing code --- libs/features/title-append/README.md | 11 ----------- libs/features/title-append/title-append.js | 8 -------- 2 files changed, 19 deletions(-) delete mode 100644 libs/features/title-append/README.md delete mode 100644 libs/features/title-append/title-append.js diff --git a/libs/features/title-append/README.md b/libs/features/title-append/README.md deleted file mode 100644 index ac9bac7a91..0000000000 --- a/libs/features/title-append/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# title-append - -The title-append feature allows you to append an arbitrary string to an HTML document's title by populating a "title-append" column for any given row in [Franklin's bulk-metadata](https://www.aem.live/docs/bulk-metadata). - -## Example - -Create or choose a doc to test with, e.g. [milo/drafts/hgpa/test/title-append.docx](https://adobe.sharepoint.com/:w:/r/sites/adobecom/Shared%20Documents/milo/drafts/hgpa/test/title-append/title-append.docx?d=w8f45e22250a841f8bfe9a49f2b6bbd9f&csf=1&web=1&e=hboge3). Note it's current title. - -Next add a row to metadata spreadsheet targeting file or folder above. Create the `title-append` column if it does not exist. Populate the cell with the string you want to append, e.g. [milo/metadata.xlsx](https://adobe.sharepoint.com/:x:/r/sites/adobecom/Shared%20Documents/milo/metadata.xlsx?d=w0b3287f28ee948b3b1b25418bc8f9fc0&csf=1&web=1&e=uvd1IJ). Remember to preview / publish the metadata sheet to see changes reflected on your page. - -Confirm test doc has defined string prepended, e.g. https://milo.adobe.com/drafts/hgpa/test/title-append/title-append. diff --git a/libs/features/title-append/title-append.js b/libs/features/title-append/title-append.js deleted file mode 100644 index fa7a4e0c9d..0000000000 --- a/libs/features/title-append/title-append.js +++ /dev/null @@ -1,8 +0,0 @@ -export default function titleAppend(appendage) { - if (!appendage) return; - document.title = `${document.title} ${appendage}`; - const ogTitleEl = document.querySelector('meta[property="og:title"]'); - if (ogTitleEl) ogTitleEl.setAttribute('content', document.title); - const twitterTitleEl = document.querySelector('meta[name="twitter:title"]'); - if (twitterTitleEl) twitterTitleEl.setAttribute('content', document.title); -}