I have been working with a project where style overrides are written at _site/assets/main.css
. I am trying to add another css file mystyles.css
but not able to make it work.
This is the project structure:
.
├── 404.html
├── Gemfile
├── Gemfile.lock
├── README.md
├── _config.yml
├── _includes
│ ├── head.html
├── _posts
│ └── 2023-01-21-abc.md
├── _site
│ ├── 2023
│ ├── 404.html
│ ├── README.md
│ ├── about
│ │ └── index.html
│ ├── assets
│ │ ├── main.css
│ │ ├── main.css.map
│ │ ├── minima-social-icons.svg
│ │ └── mystyles.css
│ ├── feed.xml
│ ├── index.html
│ ├── jekyll
│ └── privacypolicy
│ └── index.html
This is _includes/head.html
content:
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{%- seo -%}
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
<link rel="stylesheet" href="{{ "/assets/mystyles.css" | relative_url }}">
{%- feed_meta -%}
{%- if jekyll.environment == 'production' and site.google_analytics -%}
{%- include google-analytics.html -%}
{%- endif -%}
{%- include onesignal.html -%}
</head>
In is what I get in browser's devtool's Source's "Page" tab:
top
├── mysite.io
│ └── assets
│ └── main.css