Skip to content

Commit

Permalink
Displays images from Links. Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
javierarce committed Jul 6, 2024
1 parent 10246c6 commit 66e3761
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions lib/Commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export default class Commands {

let content = block.content;

if (block.class === "Image") {
if (block.class === "Image" || block.class === "Link") {
const imageUrl = block.image?.display.url;
content = `![](${imageUrl})`;
}
Expand Down Expand Up @@ -202,7 +202,7 @@ export default class Commands {
const title = block.generated_title;
let content = block.content;

if (block.class === "Image") {
if (block.class === "Image" || block.class === "Link") {
const imageUrl = block.image?.display.url;
content = `![](${imageUrl})`;
}
Expand Down Expand Up @@ -246,7 +246,6 @@ export default class Commands {
async getBlockFromArena() {
const onSelectChannel = async (channel: Channel) => {
const onSelectBlock = async (block: Block, channel: Channel) => {
console.log(block);
const fileName = `${block.generated_title}`;
const frontData = Utils.getFrontmatterFromBlock(
block,
Expand All @@ -256,7 +255,7 @@ export default class Commands {

let content = block.content;

if (block.class === "Image") {
if (block.class === "Image" || block.class === "Link") {
const imageUrl = block.image?.display.url;
content = `![](${imageUrl})`;
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "arena-manager",
"name": "Are.na Manager",
"version": "1.0.1",
"version": "1.0.2",
"minAppVersion": "1.6.4",
"description": "Publish content from your vault to Are.na and the other way around.",
"author": "Javier Arce",
Expand Down

0 comments on commit 66e3761

Please sign in to comment.