-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Author fields & templates; Blog App updates #1867
Conversation
4741476
to
bb3ada4
Compare
let realmUrl = this.args.model[realmURL]; | ||
if (!this.args.model.id || !realmUrl?.href) { | ||
throw new Error(`Missing card id or realm url`); | ||
} | ||
let relativeTo = relativeURL( | ||
new URL(this.args.model.id), | ||
new URL(`${cardRef.module}/${cardRef.name}`), | ||
realmUrl, | ||
); | ||
if (!relativeTo) { | ||
throw new Error(`Missing relative url`); | ||
} | ||
filter.query = { | ||
filter: { | ||
on: cardRef, | ||
eq: { 'blog.id': this.args.model.id! }, | ||
any: [ | ||
{ eq: { 'blog.id': this.args.model.id } }, | ||
{ eq: { 'blog.id': relativeTo } }, | ||
], | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to cover both relative and absolute urls in the linksTo search.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
990876b
to
35a584f
Compare
use featured-image field in blog post
35a584f
to
820f5b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks terrific!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this locally and it looks good
Changes:
FeaturedImage
and use in author and blogpost isolated templates (uses image url, has caption/credit fields)isUsed
field property was needed)Isolated Author:
![isolated-author](https://private-user-images.githubusercontent.com/16160806/394939179-1017e065-4cc1-4198-aa5e-f5b344e6ebd4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTUyNjgsIm5iZiI6MTczOTM1NDk2OCwicGF0aCI6Ii8xNjE2MDgwNi8zOTQ5MzkxNzktMTAxN2UwNjUtNGNjMS00MTk4LWFhNWUtZjViMzQ0ZTZlYmQ0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDEwMDkyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEwYzk3NzAwMTFhZmE1MmY5MjMyYmQ2NTkyMDY5MjhlNGJhZWNlNDZmOTMxMTIxYTMyZTU3ZGY2M2U3N2ZmMDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.GgjIkJKo8Nj8d9-v-VqcOmew9q-Sb_KapLRHrt7LbQ0)
![isolated-small](https://private-user-images.githubusercontent.com/16160806/394939229-57033968-9931-4768-a110-1fbbee3ff283.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTUyNjgsIm5iZiI6MTczOTM1NDk2OCwicGF0aCI6Ii8xNjE2MDgwNi8zOTQ5MzkyMjktNTcwMzM5NjgtOTkzMS00NzY4LWExMTAtMWZiYmVlM2ZmMjgzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDEwMDkyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZhYjIxODYxYzczMzRkYTFkY2M2YjY3MWMwZjViYjgxNjcyYWMxODgxNGM0MWRhMDgyMzJkZGJlZTIyNGYwZTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.N10d_jKR-6pnO-7Dv3X_v-nX3TrkXeKmDVezCPLjils)
Embedded Author:
![embedded-author](https://private-user-images.githubusercontent.com/16160806/394939250-76bcf212-1cb8-4a64-813a-abc516099335.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTUyNjgsIm5iZiI6MTczOTM1NDk2OCwicGF0aCI6Ii8xNjE2MDgwNi8zOTQ5MzkyNTAtNzZiY2YyMTItMWNiOC00YTY0LTgxM2EtYWJjNTE2MDk5MzM1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDEwMDkyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA5NmM1NzllMjkwOGZjYjIwOWRjOTk0MDUxNDNiNGJhODNhOTMxOTQzYWRkZjkyNzg4MTlmYjg1ZDRlZWFhN2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.VSQ7mJNzDQqD6ISi5-xNaDnBJVmccRRMjnMsPcyqc0g)
One of the fitted views:
![fitted-author](https://private-user-images.githubusercontent.com/16160806/394939945-7000338a-13e9-4e50-b412-baaa9792e048.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTUyNjgsIm5iZiI6MTczOTM1NDk2OCwicGF0aCI6Ii8xNjE2MDgwNi8zOTQ5Mzk5NDUtNzAwMDMzOGEtMTNlOS00ZTUwLWI0MTItYmFhYTk3OTJlMDQ4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDEwMDkyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU1NmEzNDc0YjNjMzdlNDRjODI0ZWQ2MmY4NGU5MzQzYWI4ZTI4NWQwN2I5ZDA1YWMyZDBiNWEwYzY5MDVhNzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.a-LwJxlZCMeTfiY4fbAEE8P414k-fuBLO73JXYp-YHc)