forked from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add PDP metadata script * Add additional metadata fields * Update hlxignore and add README
- Loading branch information
Showing
8 changed files
with
427 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ package-lock.json | |
test/* | ||
postinstall.js | ||
tools/picker/src/* | ||
tools/pdp-metadata/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
metadata.xlsx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# PDP Metadata Generator | ||
|
||
## Overview | ||
It is recommended to import product metadata into Edge Delivery so that it can be rendered server-side on product detail pages. | ||
This is important so social media sites which do not parse JavaScript can pick it up. | ||
|
||
This project is designed to fetch product data from a catalog service, process it, and generate a metadata spreadsheet in XLSX format which can be used for the https://www.aem.live/docs/bulk-metadata feature in Edge Delivery. | ||
|
||
## Prerequisites | ||
- Node.js installed on your machine. | ||
- Access to the catalog service with the necessary API keys and configuration. | ||
|
||
## Installation | ||
1. Clone the repository to your local machine. | ||
2. Navigate to the project directory. | ||
3. Run `npm install` to install the dependencies. | ||
|
||
## Configuration | ||
Before running the application, you need to ensure the `configFile` variable in `pdp-metadata.js` points to the correct configuration JSON file URL. This file contains the required parameters to access Catalog Service and should have been setup as part of your project onboarding. | ||
|
||
## Running the Application | ||
To start the application, run the following command in the terminal: | ||
|
||
```bash | ||
npm start | ||
``` | ||
|
||
This will fetch the product data, process it, and generate a file named `metadata.xlsx` in the project directory. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "pdp-metadata", | ||
"private": true, | ||
"type": "module", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "pdp-metadata.js", | ||
"author": "", | ||
"license": "Apache-2.0", | ||
"scripts": { | ||
"start": "node pdp-metadata.js" | ||
}, | ||
"dependencies": { | ||
"he": "^1.2.0", | ||
"xlsx": "^0.18.5" | ||
} | ||
} |
Oops, something went wrong.