Why is image not loading in jekyll when hosted in github? - github

I have a blog made using jekyll which is hosted at https://github.com/rocka0/myblog. I wanted to know why my image is not loading in the about me page.
The error for the picture is: Failed to load resource: the server responded with a status of 404 (Not Found).

Set your baseurl to /myblog (no trailing slash) and call your image with
<img itemprop="image" class="img-rounded" src="{{ site.baseurl }}/assets/img/blog-author.jpg" alt="Tush Chen">

From this config, your rocka0/myblog/_config.yml#L3-L4 should be:
# Your website URL (e.g. http://barryclark.github.io or http://www.barryclark.co)
# Used for Sitemap.xml and your RSS feed
url: http://rocka0.github.io/
# If you're hosting your site at a Project repository on GitHub pages
# (http://yourusername.github.io/repository-name)
# and NOT your User repository (http://yourusername.github.io)
# then add in the baseurl here, like this: "/repository-name"
baseurl: "/myblog"

The author image (Geekstatic Facebook avatar of Mario) is square in shape. Everything else is OK. The cases are ok. But when I looked at your config.yml your baseurl is /myblog. Change it back to correct subpath that is /myblog/
Also, check if your url (# the base hostname & protocol for your site) points to http://rocka0.github.io/myblog in config.yml

Related

Cannot save template constants in typo3

I updated the constants of my template in the web editor of typo3. Each time I click on Save or Close+Save I get a pop-up from my browser to download a file. The content is like this:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>503 Service Unavailable</title>
</head><body>
<h1>Service Unavailable</h1>
<p>The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.</p>
</body></html>
The minimal example to get this is:
page.theme {
socialmedia.channels {
facebook.url = https://www.facebook.com/typo3/
}
}
It seams that Typo3 has a problem with the dots in the url. If I remove all of them or escape with a backslash "\" everything works. (But the backslash remains in the url and therefore produce invalid urls)
Some months before everything works fine. Some other templates in the same installation have also urls in their configuration and they are working (the page is rendered normaly). If I try to save them noe without any changes I get the same error.
That is the system I use:
Typo3-Version: 9.5.20
Webserver: Apache/2.4.43 (Unix)
PHP-Version: 7.3.21
Database: MySQL 5.6.42
Applicationcontext: Production
OS: SunOS SunOS localhost 5.10 Generic_150401-49 i86pc
Bootstrap Package: 11.0.2

Routing to a URL behaves differently in config

I am attempting to get familiar with spring-cloud-gateway and I am having a problem configuring routes in YAML. I am attempting to do a simple redirect based on path to httpbin.org. This works fine when I do this in code but when I am attempting this in YAML config I get a 404.
YAML:
- id: demo
uri: http://httpbin.org
predicates:
- Path=/demo
When I attempt this route, it looks like the route is getting matched- I dont see a 404 for the route itself. What I get in the response is
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try
again.</p>
What am I doing wrong here?

TYPO3 v9.5.0 - Error message: Requested page does not exist /robots.txt

TYPO3 v9.5.0 - Error message: Requested page does not exist /robots.txt
I have a TYPO3 9.5.0LTS and use the bootstrap package theme. It seems to be all working ... but quite often I get such error messages:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1518472189: The requested page does not exist | TYPO3\CMS\Core\Error\Http\PageNotFoundException thrown in file /is/www/typo3_src-9.5.0/typo3/sysext/frontend/Classes/Controller/ErrorController.php in line 82. Requested URL: domain/robots.txt
What causes this and how to prevent this? Or how do I create a robots.txt in v.9.5 ?
In TYPO3 9.5 you can add a robots.txt in your Sites module.
Sites -> Choose your site -> Static Routes -> Create new.
Static Route Name: select "robots.txt"
Route Type: select "Static Text"
Static Text: Select "robots.txt Example Content"
Save. Should be fixed now.
This will work for all TYPO3 versions. For TYPO3 V9.x use the solution by Thomas Löffler.
Your server configuration (apache? .htaccess?) will hand over any request to a source that is no file and no directory and no symbolic link to the index.php file which is TYPO3.
In your case, you do not have a file robots.txt. So TYPO3 wants to handle it, but has no resource with that name. This creates a 404 error in TYPO3.
To prevent this, jst create the robots.txt file on your webserver in the DOCUMENT_ROOT folder
So what is a robots.txt file anyway.
This is a method to tell search engines how to behave on your server. It contains recomendations to the search engines' crawlers, when to stop crawling (like typo3_src folder). It is requested by the crawlers automatically and regularly.

Integrate With Google button: Failed to execute ‘postMessage’ on ‘DOMWindow’

I am trying to add Integrate With Google button to our website using the instructions at https://developers.google.com/gsuite/marketplace/button.
According to the instruction, I need to add:
<script type="text/javascript" src="https://apis.google.com/js/platform.js"/>
to head and then incorporate:
<g:additnow applicationid="[appid]"></g:additnow>
The button is not rendered. The error in browser console says:
Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘https://accounts.google.com’) does not match the recipient window’s origin (‘http://server.local:8090’).
Load denied by X-Frame-Options: `
https://apis.google.com/additnow/additnow.html?usegapi=1&applicationid=[appid]&origin=http%3A%2F%2Fserver.local%3A8090&gsrc=3p&ic=1&jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.en_US.Vch8vd-lM6E.O%2Fm%3D__features__%2Fam%3DAQE%2Frt%3Dj%2Fd%3D1%2Frs%3DAGLTcCOgsbyjgLVijKgLfaXMbki4Pxbd_A#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Cdrefresh%2Cerefresh%2Claunchurl&id=I0_1517552817258&_gfid=I0_1517552817258&parent=http%3A%2F%2Fserver.local%3A8090&pfname=&rpctoken=19038946
> does not permit cross-origin framing.
A couple of points:
I am loading the page using the Tomcat web server
server.local resolves to 127.0.0.1
http anywhere browser extension is disabled
The page is not being loaded in an iframe
I tried loading platform.js without https. make no difference.
Any ideas?

servlet filter for url rewriting makes gwt page getting 404

I have a GWT application /application.html
for easy access (and SEO) I would like make url rewriting like /station/fr/foo mapping
I'm trying with a servlet filter declared like this
url-pattern : /station/*
and in this filter, I split parts of the url to build parameters for the target url:
and I do :
request.getRequestDispatcher( targetUrl ).forward( request, response);
But it seems to try accessing /station/Application.html and then 404
[ =========== edited from here =========== ]
Well, know, since this question, I understood a few things: the html page is reached, but tries to load his resources (css, js, img) in /station/
This behaviour is done by the browser (!)
If I had <base href="http://servername/"> it works, but I can't get dev mode working anymore...
Is there's a way to transparently modify on the fly the response to change paths in html source ?
You are looking for fixing the app path in both hosted jetty mode and tomcat/deployment mode to be same - Try https://groups.google.com/d/topic/google-web-toolkit/a8OsRmMSaMg/discussion
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
"http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<Set name="contextPath">/yourapp</Set>
</Configure>