Styling Jekyll website with Bootstrap - css

I am trying to set up a website using Jekyll and GitHub Pages (first-timer), and most importantly, to style it with Bootstrap.
You can check what I have already done:
GitHub repository: https://github.com/thibaudclement/wallaby
GitHub page: http://thibaudclement.github.io/wallaby/ (check gh-pages branch)
Also, I followed this tutorial to import Bootstrap into the Jekyll structure.
Layouts and includes seem to work just fine, but I don't understand why my index.html does not get "styled" as it should, fetching information into the css/style.css file.
Any idea of what I am doing wrong?
Thanks.

The path to your css file is incorrect - it's not loading if you check your browser console
"Failed to load resource: the server responded with a status of 404 (Not Found) - http://thibaudclement.github.io/wallaby/style/site.css"

In _config.yml, you need to set baseurl: /wallaby.
And use {{ site.baseurl }} to load resources like this :
<link href="{{ site.baseurl }}/css/style.css" media="screen" rel="stylesheet" type="text/css" />.
See Jekyll documentation.

Related

Laravel 8 auth not getting the CSS online but on localhost it's working

Good Day to You!
I am using Laravel 8 auth, running the following:
laravel new e_shop --jet --stack=livewire
php artisan vendor:publish --provider="Laravel\Fortify\FortifyServiceProvider"
npm install & npm run dev
php artisan migrate
on localhost, everything is working fine, but the online CSS register & login not working. :(
Here is the website location: http://www.gardoweb.com/e-shop
If&when you click on login, you see my problem.
Before I put online Laravel8 app I run the following, but it does not help:
php artisan optimize:clear
I deleted the bootstrap CACHE content.
In the public folder there are these files:
e_shop\public\css\apps.css
e_shop\public\js\apps.js
It was compiled with webmix.
e_shop\resources\views\layouts\app.blade.php the declaration as follows:
in the head ->
<link rel="stylesheet" href="{{ mix('css/app.css') }}">
<script src="{{ mix('js/app.js') }}" defer></script>
So that's all, I don't know what to do next, I am on godaddy.
Thank you for your response, good day!

Why there are lots of 0.js 1.js 404 file

I build my nextjs app and then run yarn start,
I find there are a lot of 404 files.
I want to know what are these files and how can I remove these files,
There are two ways to solve this problem
1.<Link href='posts/0' prefetch={false}/>
2.Change <Link href='posts/0'/>to <Link href='posts/[page]' as='posts/0'/>
reference:
https://nextjs.org/docs/api-reference/next/link
Next.js 404 error for all preloaded links
thanks George!

Issue loading CSS and JavaScript files in Laravel

I'm having a strange issue in my Laravel 5.2 app. Specifically with loading some CSS and JavaScript files. I have this in the folder public/assets so, I have something like this:
|--public
|----/assets
|-------/css
|------------/auth
|---------------login.css
|----------main.css
|-------/js
|---------email.js
|---------/modules
|------------faq.js
That is my directory, so I'm loading the CSS with:
<link href="{{ URL::asset('assets/css/main.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ URL::asset('assets/css/auth/login.css') }}" rel="stylesheet" type="text/css" />
And the JavaScript files with:
<script src="{{ asset('assets/js/email.js') }}" type="text/javascript"></script>
<script src="{{ asset('assets/js/modules/faq.js') }}" type="text/javascript"></script>
Also I'm loading another files as well but I'm explaining the basic situation. So, the thing is that the load of login.css and faq.js are giving me 404 error but the other files are loaded correctly, I even checked open the files through the absolute paths and they're loaded fine, also I made chown to www-data of the public folder but nothing works, so I don't know why a 404 error is triggered. What else should I check?
In the console of the browser the links that are loaded are:
http://mydomain/assets/js/modules/faq.js
http://mydomain/assets/css/auth/login.css
But they give 404 error, and the other files doesn't
first check those 404 files are in there definitely
check those files have readable permisstion

How to show customized 404 error page - Symfony2

I have this in my controller:
if(some stuff) {
throw $this->createNotFoundException('message');
}
When I test it in dev env, I get the Symfony's page telling Exception detected with my text, but I can't test it in prod env :( I run this php app/console cache:clear --env=prod --no-debug and then replace only in the URL app_dev.php with app.php but the toolbar and Symfony's error page stay.
I created this file - app/Resources/TwigBundle/views/Exception/error.html.twig. So will it be rendered in prod?
This is in it:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>An Error Occurred: {{ status_text }}</title>
</head>
<body>
<h1>Oops! An Error Occurred</h1>
<h2>The server returned a "{{ status_code }} {{ status_text }}".</h2>
</body>
</html>
where should I give values for status_code and status _text? Or they are taken from the exception?
So in general what I want to do is when a condition in my contoller`s action is true, mine customized error page to be shown in prod env. Did I make it already, and if not, how to make it and how to see the result in prod env?
I also tried and i noticed that custom error pages placed in app/Resources/TwigBundle/views/Exception/error.html.twig worked only in prod environment.
Better late than never I guess..
You probably know about overriding of templates.
You can override any template you want.
So if you want to override the dev error page, just for debugging, then you should override the template:
exception_full.html.twig
You can do so by creating such a file in this folder:
app/Resources/TwigBundle/views/Exception
Now you will see your customized 404 in dev mode.
you can access your detected text with following way:
{{ exception.message }}
Read the doc http://symfony.com/doc/2.0/cookbook/controller/error_pages.html
and Customizing the 404 Page and other Error Pages
http://symfony.com/doc/2.0/cookbook/controller/error_pages.html#customizing-the-404-page-and-other-error-pages
It appears Symfony has a new way of allowing you to see the error page templates in your dev environment. Taken from their docs:
While you're in the development environment, Symfony shows the big exception page instead of your shiny new customized error page. So, how can you see what it looks like and debug it?
Fortunately, the default ExceptionController allows you to preview your error pages during development.
To use this feature, you need to have a definition in your routing_dev.yml file like so:
# app/config/routing_dev.yml
_errors:
resource: "#TwigBundle/Resources/config/routing/errors.xml"
prefix: /_error
Read more: Symfony Error Pages Manual

CSS 404 error using Django

CSS link:
<link rel="stylesheet" href="/site_media/style.css"
type="/text/css" />
I'm getting a -404 error while loading my CSS sheet.When I try to debug the location thru Firebug(Firefox), I get the below location.
"C:\Python27\Djangoprojects\django_bookmarks..\django_bookmarks\site_media\style.css" does not exist
Site_media is determined by the Python code in URLS.py
site_media = os.path.join(os.path.dirname(__file__), 'site_media')
Why do I get the ..\ in the location?

Resources