Skip to content
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

fix(css): Fix CSS by cleaning it up #2

Merged
merged 3 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
Expand All @@ -35,12 +41,6 @@ jobs:
- name: Install Dart Sass
run: sudo snap install dart-sass

- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
Expand All @@ -58,7 +58,7 @@ jobs:
--gc \
--minify \
--environment "${HUGO_ENVIRONMENT}" \
--baseURL "${{ steps.pages.outputs.base_url }}"
--baseURL "${{ steps.pages.outputs.base_url }}/"

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
Expand Down
6 changes: 4 additions & 2 deletions config/_default/hugo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
baseurl = "localhost"
baseURL = "localhost"
title = "pixincreate"
languageCode = "en-us"
theme = "hello-friend-ng"
Expand Down Expand Up @@ -36,8 +36,10 @@ canonifyURLs = true
description = "pixincreate's website"
keywords = "blog, homepage, portfolio, resume"
images = [""]
justifyContent = true
rss = true

customCSS = ["css/custom.css"]
custom_css = ["css/styles.css"]

[[languages.en.params.social]]
name = "github"
Expand Down
2 changes: 1 addition & 1 deletion config/production/hugo.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
baseurl = "https://pixincreate.dev/"
baseURL = "https://pixincreate.dev/"
2 changes: 1 addition & 1 deletion config/staging/hugo.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
baseurl = "https://pixincreate.github.io/pixincreate.dev/"
baseURL = "https://pixincreate.github.io/pixincreate.dev/"
14 changes: 2 additions & 12 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,11 @@
{{ end }}

<!-- CSS -->
{{ range .Site.Params.custom_css -}}
<link rel="stylesheet" href="{{ . | absURL }}">
{{- end }}

{{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $style := resources.Get "scss/main.scss" | resources.ToCSS $options | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}">

{{ range $val := $.Site.Params.customCSS }}
{{ if gt (len $val) 0 }}
<link rel="stylesheet" type="text/css" href="{{ $val }}">
{{ end }}
{{ end }}

<!-- Custom CSS handled here -->
{{ range .Site.Params.customCSS -}}
{{ range .Site.Params.custom_css -}}
<link rel="stylesheet" href="{{ . | absURL }}">
{{- end }}

Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<label for="message">Message</label>
<textarea id="message" name="message" placeholder="Lorem ipsum dolor sit amet," required></textarea>
</div>
<button type="submit">Submit</button>
<button>Submit</button>
</form>
</div>
<script>
Expand Down
File renamed without changes.