png flags not displayed on live website - Astro. js project - image

png flags are not displayed on live website, https://mytopcountries.web.app/blog/top-countries/ but on localhost they are showing up
`---
title: "My Top Countries"
excerpt: "I have visited 65 countries so far."
publishDate: "2022-12-28T11:39:36.050Z"
image: "./src/assets/bird.jpg"
category: "design"
author: "mario-sanchez"
tags: [countries]
here are my top 10:
I have visited India just once, but I will definitely be back
I have been there already 5 times
my first trip in 2022
`
the files are in the folder src/assets/flags/in.png I have tried different paths but they are not getting displayed on the live website https://mytopcountries.web.app/
localhost :

Related

quarto yaml to render qmd files that start with _

I'm playing around with two different models for my website in quarto, one includes all the chapters in the index.qmd file so I have to name each chapter with an underscore in front.
When I try to render the chapters separately, they aren't rendered as they start with _, e.g. "chapters/_02-Intro_to_analysis_software.qmd".
I've tried explicitly telling quarto to render these chapters using _quarto.yml
project:
type: website
render:
- index.qmd
- about.qmd
- "chapters/_01-Intro_to_quant_methods.qmd"
- chapters/_02-Intro_to_analysis_software.qmd
But when I run quarto render it only renders the about and index qmd files.
[...]
label: unnamed-chunk-1
|......................................................................| 100%
ordinary text without R code
?[31moutput file: index.knit.md
?[39m←[1m←[34m[2/2] about.qmd←[39m←[22m
Output created: _site\index.html
How do I get quarto to render files that start with an underscore?

Google Sheet & App Script : how to get image from a link preview?

I am trying to reproduce a RSS reader like Feedly with Google Sheet and displaying with Glide as an app on my mobile phone.
Everything's fine with IMPORTFEED() function with titles, description, URL.
But it seems this function doesn't allow pictures to be displayed even if they are in the feed (which is not all the time).
So I am looking for a way to extract the main image from a blog post... the one displayed when you hover on a link in a Google Sheet cell.
I would like to get the link of that image displayed in the link preview and put that link in another cell.
Here is an example:
I tried IMAGE()
and also IMPORTXML when there is an image in the RSS feeds (but not all of them do... so I stopped)
Is it possible in Google Sheet to get the main image from the one displayed in the link preview ?
For instance, one of the blog I want to extract the main picture of a blog article would be Creajv (URL : https://creajv.com/ ; Feed : https://creajv.com/feed/)
So the IMPORTFEED() function I did in Google Sheets was :
=IMPORTFEED("https://creajv.com/feed/";"items";FALSE;3)
Which stands for :
=IMPORFEED(...) the function to import feeds from an URL
"items" the way to pull every data there is in the feed (you can use other parameters and can see all the possibilities on the GoogleFormulas documentation)
FALSE because I don't want the headers to be included
and the number 3 because I want only the last 3 results displayed.
And it displays perfectly : author, description, URL, date
But I did a little digging in Google and found that basically IMPORTFEED() cannot get images from feeds, even if it is added by the author of the blog (he has to add a feature to do it).
So I am now trying to see if there is another way which is not IMPORTFEED() to get every time the main image of a blog post.
And I saw Google Sheet is able to pull instantly it when I copy paste the URL of a blog article within a cell for instance for Creajv :
Print screen of the image I get when I click in the cell which contains the post URL
So my thoughts would be that I can pull the author, date, description etc. with IMPORTFEED (which works perfectly every time) and use a formula on the cell with the URL to get in another cell the URL of the picture pulled from the one in the link preview.
Two other possibilities might also be with Google App Script :
creating with the App Script a custom function
or creating a script pulling the image in a cell every time a new row is added via the IMPORTFEED() function.
Functions only, as Apps Script doesn't run on mobile Apps
How about this solution? I checked the website and inspected the image from the thumbnail.
Luckily, the structure is simple:
<div class="article-image">
<img src="https://creajv.com/wp-content/uploads/2020/11/HighresScreenshot00000.png" alt="Concours de Level Design avec Unreal Engine, du 11/11 au 05/12/2020">
</div>
You can get the url with IMPORTXML, and apply IMAGE to it:
=IMAGE(ImportXml("https://creajv.com/2020/11/08/concours-de-level-design-avec-unreal-engine/", "//div[#class='article-image']//img/#src"))
Since you are already retrieving the post url with your previous formula, change the source url by the correspondent cell:
=IMAGE(ImportXml(C1, "//div[#class='article-image']//img/#src"))
For example:

Jekyll treating YAML hyphens as dashes

Jekyll is not parsing a post correctly, and I can't find the error; the YAML front matter is the same as in our other posts. Here are the two differences:
(1) For some reason, Jekyll is rendering the three dashes at the bottom of the YAML front-matter as a single dash: category: German — Doch is a modal particle,. I have tried deleting these hyphens and retyping them, and that has not solved the problem.
(2) We are trying to create a new category with this post called "German." Jekyll has automatically created our categories from other posts, but in this instance, it is not creating the "German" category and is instead placing the post in a folder of its own.
When I open the page in the browser, I see this at the top:
layout: post author: WordBrewery title: “How to use the German doch” description: “How to use and understand the German modal particle doch.” image: hohenschwangau.jpg featured: true published: true category: German — Doch is a modal particle, a word used to indicate attitude, tone or the focus of a sentence.
Here is the YAML front-matter and first line of the post:
---
layout: post
author: WordBrewery
title: "How to use the German doch"
description: "How to use and understand the German modal particle doch."
image: hohenschwangau.jpg
featured: true
published: true
category: German
---
*Doch* is a [modal particle](https://en.m.wikipedia.org/wiki/German_modal_particle), a word used to indicate attitude, tone or the
I would greatly appreciate any help.
Appearance of the unparsed post
(Moved from comments to answer)
You need to make sure that the markdown file encoding is correct (utf8 no BOM). Jekyll has a problem with BOM in the front matter http://jekyllrb.com/docs/frontmatter/

Extract the number of views/revenue for a specific video (Youtube CMS)?

My friend works as a CMS admin for a Youtube Network and asked me if there is a way to automatically extract the number of views and the revenue for specific videos. Let me explain. If some people upload copyrighted material, as a CMS admin you have 2 options, either remove the video or claim it/add an asset so that ads appear on the video when being watched but the problem is that those videos are not connected to an partnered account so you can't see the revenue for that channel but have to check each video individually. So if I have a video (making it up) with the link: http://www.youtube.com/watch?v=123abcEFG56, you can take the code of the video, "123abcEFG56", paste it into the search-box of the Youtube CMS analytics and you get all the information for that video if you claimed it/added an asset to it (he tried to search by using words which are part of the video title (he tried even the exact title) in the YT CMS analytics but this works only for videos that are uploaded on a partnered channel/account so for videos uploaded on non-partnered channels, you can only view the statistics for that video if you put in the code of the video into the search box).
I came up with an idea, I visited some of the channels with the claimed videos, clicked on the video's tab and copied the html code. Then, by using a regular expression and PowerShell (Win7), I extracted all the video codes into a .txt file. Each line of the .txt file contains one video code, for example, it would look something like this:
123abcEFG56
123abcEFG57
123abcEFG58
...
So, this is not about a regular Youtube account but a CMS account and since analytics offers it, I would like to extract the data from the "Last Month" (default on Youtube is: "Last 30 days").
I am not familiar with the Youtube-API, so my question is, is it possible (and if yes, how) to make a batch script which would take one code per line and request the views and revenue made last month for the video with the corresponding code, and then "write" that info into another .txt or .csv file (ideally: "Video name", "Number of views", "Revenue")?
Thanks in advance for your answers!
You can use the Content ID API for this. Please reach to your partner manager for details.

make bigger joomla modal pop up box in admin area

yes its a joomla question and im sorry to annoy but asking on the joomla forum takes forever or gets ignored.
Im really trying to find where i can modify the iframe modal box to be larger than the default.
When you go into article edit mode and choose to insert an intro image or full article image theres a select input field button. When select is clicked it opens a modal window that is quite small. I wanted to apply a full screen modal to it or at least make it 960x600px as opposed to 800x500px
But the thing is that the select button is generated by an xml file with fields in it.
The xml must be calling a function somewhere that generates the html for that button based on type=media inside the xml file but i cant seem to find where that function or code snippet is.
I just want the modal for selecting an image to be larger, it seems crazy not to make such a thing bigger instead of having horizontal and vertical scroll bars.
the file im referring to in joomla 2.5 for the xml fields:
line 540 and 572 ( Thats the two instances of intro image and full image )
administrator/components/com_content/models/forms/article.xml
That is the file where the image intro and full article image select fields are located.
then this file generates the output of them:
line 203 ( It does a foreach loop to grab the xml fields )
administrator/components/com_content/views/article/tmpl/edit.php
But i cant for the life of me figure out where this part in the html output on the article edit mode in the joomla admin is generated:
<div class="button2-left">
<div class="blank">
<a class="modal" title="Select" href="index.php?option=com_media&view=images&tmpl=component&asset=34&author=&fieldid=jform_images_image_intro&folder=news" rel="{handler: 'iframe', size: {x: 800, y: 500}}"> Select</a>
</div>
</div>
Thanks in advance
john
The file you are looking for is:
libraries/joomla/form/fields/media.php
line 121:
. ' rel="{handler: \'iframe\', size: {x: 800, y: 500}}">';
Since it appears that key details of the accepted answer to the original poster's question occurred via direct communication (based on comments in the first answer), for me it was necessary for me to search around for more information on where to change the sizing of modal windows—especially since it seems that the sizing of various popups are defined in different places.
So, in the hopes that this is helpful to others in similar circumstances, I'm leaving what information I was able to find out about which files have to do with modal behavior, appearance, and configuration.
Here's how the list is organized:
All the files in which I was able to find modal settings defined (or
items that seemed closely related to modal appearance and/or
behavior)
The line number on which relevant settings/configuration occurs (as
of 2.5.6)
Quotes of any nearby text that might provide insight to where/how
that particular modal is being used (when trying to determine if this
controls the modal you want to change), or a note of any information
that seems relevant/helpful
And here's the list itself:
\administrator\components\com_contact\elements\contact.php : 53
“COM_CONTENT_SELECT_A_CONTACT"
\administrator\components\com_contact\models\fields\modal\contacts.php : 69
“COM_CONTACT_CHANGE_CONTACT_BUTTON"
\administrator\components\com_content\elements\article.php : 55
“COM_CONTENT_SELECT_AN_ARTICLE"
\administrator\components\com_content\models\fields\modal\article.php : 78
“COM_CONTENT_CHANGE_ARTICLE"
\administrator\components\com_menus\models\fields\menutype.php : 71
\administrator\components\com_menus\views\item\tmpl\edit_modules.php : 46
“COM_MENUS_EDIT_MODULE_SETTINGS"
\administrator\components\com_menus\views\menus\tmpl\default.php : 113
“COM_MENUS_EDIT_MODULE_SETTINGS"
\administrator\components\com_modules\models\fields\moduleposition.php : 77
“COM_MODULES_CHANGE_POSITION_TITLE"
\administrator\components\com_newsfeeds\models\fields\modal\newsfeeds.php : 81
“COM_NEWSFEEDS_CHANGE_FEED_BUTTON"
\administrator\modules\mod_multilangstatus\tmpl\default.php : 14
“MOD_MULTILANGSTATUS"
\components\com_content\views\article\tmpl\default_links.php : 65
“class="content-links"”
\components\com_weblinks\views\category\tmpl\default_items.php : 110
\libraries\cms\form\field\user.php : 94
"JLIB_FORM_CHANGE_USER"
\libraries\joomla\html\toolbar\button\popup.php : 53 This
looks like it may be the php file setting up the base parameters &
such, which is invoked and built off of everywhere else.
\media\system\js\modal-uncompressed.js : entire file Contains
the interactive (client-side) logic for modal usage (note that Joomla
modal windows are SqueezeBox derived).
\media\system\js\modal.js : entire file
Same content as the file above, just minified.
\plugins\user\profile\fields\tos.php : 81 As far as I can see,
this seems to be used for displaying terms of service to end
users—probably if you created your own TOS that your users need to be
aware of and agree to.

Resources