-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
Add ability to set feature image as URL #1216
Conversation
This is very useful if you're moving from a theme that supports feature image via URL. |
0087702
to
08ab6d3
Compare
Thanks @aakashnand I'll need some time to review this PR. My initial skim I would ask you to not do a style override in the single.html file. Either use the tailwind classes or create a new object in the main.css files that gets compiled into the final theme. Inline styling is really hard to manage. Also kudos on getting docs sorted already :) |
@nunocoracao. Understood. I will update and see what can be done. I also forgot to add documentation about the new config that I introduced. |
@nunocoracao can you share any example of fetching frontmatter variables in CSS? I read many sites but I could not find how to access What do I want to achieve?Currently, the maxWidth responsible for markdown width is fixed at
this can be problematic when we enable a table of contents for the article. I wanted to add a front matter to be able to customize this width |
@aakashnand please remove the extra parameter .Params.maxWidth from this PR. This is getting a little bloated and should be separate things. Also I don't think we should have that parameter in frontmatter |
Yes will remove it soon. After going through the related issue. I think it's not necessary as I can override for my site. |
08ab6d3
to
289b3ff
Compare
@nunocoracao removed maxWidth. Let me know what do you think now. |
@aakashnand I think it's just missing a check for whether the URL is defined in frontmatter before trying the getRemote calls. Also (and I didn't have time to check everything yet) I was not sure if the logic is the same for all? i.e. local image -> remote -> site default |
Let me recheck. If you can point to specific line or file that would be super helpful |
I made the changes you suggested.
|
0bfa28d
to
0e18ee2
Compare
Also added ability to set author image as external url and updated relevant documentation in configuration
0e18ee2
to
19520b4
Compare
sweet :) thanks a lot |
@aakashnand I ended up making "some" changes e87e066 |
@nunocoracao Thank you so much for making the additional changes. I am glad I found this theme. I will soon send PR to add my site as a user |
Thank you for this awesome theme @nunocoracao.
When I started using this theme I faced a problem with setting images in my theme. The current version only supported images from the
asset
folder. This can make the git repository and history bigger if we want to use multiple images for each blog post. Many users already had raised issues about this feature. I summarized all of them in #1211To fix this, I have added the following functionalities.
homepage.homepageImage
can now be set as an external image URL. The theme will check if the file is present locally if not it will check if the file is present in the URL specified.featureimage
. This will be the external URL of an image to be used as a feature image.featureimagecaption
. This will be the caption for the image which will be displayed inarticle.heroStyle=big
Let me know your feedback and if anything needs to be improved.
Closes #1215