-
-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 526932b
Showing
54 changed files
with
2,727 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.hugo_build.lock | ||
|
||
exampleSite/.hugo_build.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2023 Sidharth R. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<h1 align=center> Awesome hugo blog | <a href="" target="_blank" rel="nofollow">Demo</a></h1> | ||
|
||
<h4 align=center>📰 Clean UI | 🌙 Dark mode support | 📱 Responsive design </h4> | ||
|
||
A minimal blog theme for [Hugo](https://gohugo.io/). | ||
|
||
## Features | ||
|
||
- Minimal design | ||
- Responsive design | ||
- Light and dark mode | ||
- Syntax highlighting | ||
- RSS feed | ||
|
||
|
||
## Setup | ||
|
||
To create a new Hugo site with this theme, run the following command: | ||
|
||
hugo new site myblog | ||
|
||
Then, clone this repository into the `themes` directory of your new site: | ||
|
||
cd myblog | ||
git clone https://github.com/hugo-sid/hugo-blog-awesome.git themes/hugo-blog-awesome | ||
|
||
To preview the thmeme with example content, run the following command from the `exampleSite` directory: | ||
|
||
hugo server --themesDir ../.. | ||
|
||
## Usage | ||
|
||
To use this theme, set the `theme` variable in your site's `config.toml` to `hugo-blog-awesome`: | ||
|
||
theme = "hugo-blog-awesome" | ||
|
||
## Configuration | ||
|
||
You can have a look at the `config.toml` file in the `exampleSite` directory for an example configuration. | ||
I recommend you to copy the `config.toml` file from the `exampleSite` directory to the root directory of your Hugo site. Then, you can edit the `config.toml` file to suit your needs. | ||
|
||
## Content | ||
|
||
### Posts | ||
|
||
To create a new post, run the following command: | ||
|
||
hugo new posts/my-first-post.md | ||
|
||
Then, edit the `my-first-post.md` file to suit your needs. | ||
|
||
## Contributing | ||
|
||
If you find any bugs or have any suggestions, feel free to open an issue or a pull request. | ||
|
||
## License | ||
|
||
This theme is released under the MIT license. For more information read the [License](https://github.com/hugo-sid/hugo-blog-awesome/LICENSE.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: | ||
date: {{ .Date }} | ||
draft: true | ||
description: | ||
--- | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const body = document.body; | ||
const data = body.getAttribute("data-theme"); | ||
|
||
const initTheme = (state) => { | ||
if (state === "dark") { | ||
body.setAttribute("data-theme", "dark"); | ||
} else if (state === "light") { | ||
body.removeAttribute("data-theme"); | ||
} else { | ||
localStorage.setItem("theme", data); | ||
} | ||
}; | ||
|
||
initTheme(localStorage.getItem("theme")); | ||
|
||
setTimeout(() => body.classList.remove("notransition"), 75); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
(() => { | ||
// Theme switch | ||
const body = document.body; | ||
const lamp = document.getElementById("mode"); | ||
|
||
const toggleTheme = (state) => { | ||
if (state === "dark") { | ||
localStorage.setItem("theme", "light"); | ||
body.removeAttribute("data-theme"); | ||
} else if (state === "light") { | ||
localStorage.setItem("theme", "dark"); | ||
body.setAttribute("data-theme", "dark"); | ||
} else { | ||
initTheme(state); | ||
} | ||
}; | ||
|
||
lamp.addEventListener("click", () => | ||
toggleTheme(localStorage.getItem("theme")) | ||
); | ||
|
||
// Blur the content when the menu is open | ||
const cbox = document.getElementById("menu-trigger"); | ||
|
||
cbox.addEventListener("change", function () { | ||
const area = document.querySelector(".wrapper"); | ||
this.checked | ||
? area.classList.add("blurry") | ||
: area.classList.remove("blurry"); | ||
}); | ||
})(); | ||
|
Oops, something went wrong.