Skip to content

Commit

Permalink
read asset
Browse files Browse the repository at this point in the history
  • Loading branch information
mmeigs committed Jan 29, 2024
1 parent 012d6fc commit 0ea635e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/gatsby-source-snooty-prod/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ exports.sourceNodes = async ({ actions, createContentDigest, createNodeId }) =>
const gatsbyImages = val.static_assets.filter((asset) =>
GATSBY_IMAGE_EXTENSIONS.some((ext) => asset.key.endsWith(ext))
);
console.log('gatsbyImages ', gatsbyImages);

if (gatsbyImages?.length) {
createNode({
children: [],
Expand Down
2 changes: 0 additions & 2 deletions src/components/DocumentBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ const DocumentBody = (props) => {
}
};

console.log('images ', props.data?.pageImage?.images ?? []);

return (
<>
<Widgets
Expand Down
1 change: 1 addition & 0 deletions src/init/DocumentDatabase.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class ManifestDocumentDatabase {
async getAsset(checksum) {
if (!this.zip) {
const asset = fs.readFileSync(`assets/${checksum}`);
console.log('ASSET? ', asset);
return Buffer(JSON.parse(asset));
}
const result = this.zip.getEntry(`assets/${checksum}`);
Expand Down

0 comments on commit 0ea635e

Please sign in to comment.