Skip to content

Commit 49f48dd

Browse files
committed
quick update to padding of main element
1 parent 6bcd6e0 commit 49f48dd

4 files changed

Lines changed: 129 additions & 19 deletions

File tree

_layouts/default.html

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,30 @@
11
<!DOCTYPE html>
22
<html lang="en">
3+
34
<head>
45
<meta charset="UTF-8">
56
<meta name="viewport" content="width=device-width, initial-scale=1.0">
67
<link rel="stylesheet" href="{{ "/assets/css/nyx.css" | relative_url }}">
78
<title>{{ site.title }}</title>
89
</head>
10+
911
<body>
1012
{% include sidebar.html %}
11-
{{ content }}
13+
<main>
14+
{{ content }}
15+
</main>
1216
</body>
17+
18+
<script>
19+
document.addEventListener("DOMContentLoaded", () => {
20+
document.querySelectorAll('div.highlighter-rouge').forEach(wrapper => {
21+
const parent = wrapper.parentNode;
22+
const inner = wrapper.querySelector('.highlight');
23+
if (inner && parent) {
24+
parent.replaceChild(inner, wrapper);
25+
}
26+
});
27+
});
28+
</script>
29+
1330
</html>

_layouts/post.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,5 @@ layout: default
55
<h1>{{ page.title }}</h1>
66
<p>{{ page.date | date: "%B %d, %Y" }} – Written by {{ page.author }}</p>
77
</header>
8-
<main>
9-
{{ content }}
10-
</main>
8+
{{ content }}
119

12-
<script>
13-
document.addEventListener("DOMContentLoaded", () => {
14-
document.querySelectorAll('div.highlighter-rouge').forEach(wrapper => {
15-
const parent = wrapper.parentNode;
16-
const inner = wrapper.querySelector('.highlight');
17-
if (inner && parent) {
18-
parent.replaceChild(inner, wrapper);
19-
}
20-
});
21-
});
22-
</script>

_sass/nyx/_layout.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ footer {
1515
main {
1616
display: flex;
1717
flex-direction: column;
18-
padding: $space-4;
18+
padding: $space-4 25vw;
1919
min-width: 0;
20+
21+
@media (max-width: 600px) {
22+
padding: $space-4;
23+
}
2024
}

index.md

Lines changed: 105 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,110 @@ layout: default
33
title: Home
44
---
55

6-
# Hello Nyx!
6+
# jekyll-theme-nyx
77

8-
This is a live demo of Nyx, a simple Jekyll theme.
8+
Nyx is a dark mode based Jekyll theme focused on readability, clean typography, and simple blogging. It is designed to work out-of-the-box as a RubyGem-based theme while still being easy to customize via SCSS.
99

10-
[link to demo post](/blog/2026/01/02/markdown-showcase.html)
10+
---
11+
12+
## Installation
13+
14+
Add this line to your Jekyll site’s `Gemfile`:
15+
16+
```ruby
17+
gem "jekyll-theme-nyx"
18+
```
19+
20+
Then install the gem:
21+
22+
```sh
23+
bundle install
24+
```
25+
26+
Next, enable the theme in your _config.yml:
27+
28+
```yml
29+
theme: jekyll-theme-nyx
30+
```
31+
32+
Build or serve your site to verify everything works:
33+
34+
```sh
35+
bundle exec jekyll serve
36+
```
37+
38+
## Usage
39+
40+
This theme follows standard Jekyll conventions.
41+
42+
### Layouts
43+
44+
Nyx provides the following layouts:
45+
46+
- `default` – base layout
47+
- `post` – blog post layout
48+
49+
You can select a layout per page or post:
50+
51+
```yml
52+
layout: post
53+
```
54+
55+
### Styling
56+
57+
All styles are written in SCSS and live under:
58+
59+
```
60+
_sass/nyx/
61+
```
62+
63+
The main entrypoint is:
64+
65+
```
66+
assets/css/nyx.scss
67+
```
68+
69+
If you want to override styles, you can:
70+
71+
- copy partials from `_sass/nyx/` into your own project
72+
- or add custom styles after importing `nyx.scss`
73+
74+
### Includes
75+
76+
Reusable components live in `_includes/`, such as:
77+
78+
- `sidebar.html`
79+
80+
These can be overridden by copying them into your site’s `_includes/` directory.
81+
82+
## Development
83+
84+
To work on the theme locally:
85+
86+
```sh
87+
bundle install
88+
bundle exec jekyll serve
89+
```
90+
91+
This repository includes a dummy Jekyll site for testing theme changes.
92+
93+
Useful tasks:
94+
95+
```sh
96+
rake site # build the dummy site
97+
rake build # build the gem
98+
```
99+
100+
Built gems are placed in the pkg/ directory.
101+
102+
## Contributing
103+
104+
Bug reports and pull requests are welcome on GitHub at https://github.com/Slavetomints/jekyll-theme-nyx. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/Slavetomints/jekyll-theme-nyx/blob/main/CODE_OF_CONDUCT.md).
105+
106+
## License
107+
108+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
109+
110+
## Code of Conduct
111+
112+
Everyone interacting in the jekyll-theme-nyx project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/Slavetomints/jekyll-theme-nyx/blob/main/CODE_OF_CONDUCT.md).

0 commit comments

Comments
 (0)