Skip to content

Commit a67de31

Browse files
committed
Refactor code structure for improved readability and add jekyll-admin support
1 parent 465f488 commit a67de31

File tree

4 files changed

+39
-21
lines changed

4 files changed

+39
-21
lines changed

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ group :jekyll_plugins do
1010
gem "jekyll-seo-tag", "~> 2.8.0"
1111
gem "jekyll-sitemap", "~> 1.4.0"
1212
gem "jekyll-paginate", "~> 1.1.0"
13+
gem 'jekyll-admin', '~> 0.12.0'
1314
end
1415

1516
# Required for GitHub Pages deployment
16-
gem "rake", "~> 13.0"
17+
gem "rake", "~> 13.0"

_config.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ plugins:
6262
- jekyll-seo-tag
6363
- jekyll-sitemap
6464
- jekyll-paginate
65+
- jekyll-admin
66+
67+
jekyll_admin:
68+
hidden_links:
69+
- pages
70+
- configuration
71+
homepage: "posts"
6572

6673
# External links
6774
external_links:
@@ -79,6 +86,8 @@ exclude:
7986
- README.md
8087
- Gemfile
8188
- Gemfile.lock
89+
- Rakefile
90+
- .editorconfig
8291
- _blog/
8392
- idea/
8493
- .git/

_layouts/home.html

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -148,32 +148,32 @@ <h2 class="section-heading scroll-animate-left">Quick Start</h2>
148148
</button>
149149
</div>
150150
{% highlight python %}
151-
import asyncio
152-
from os import getenv
151+
import asyncio
152+
from os import getenv
153153

154-
from aiogram import Bot, Dispatcher
155-
from aiogram.filters import Command
156-
from aiogram.types import Message
154+
from aiogram import Bot, Dispatcher
155+
from aiogram.filters import Command
156+
from aiogram.types import Message
157157

158-
TOKEN = getenv("BOT_TOKEN")
158+
TOKEN = getenv("BOT_TOKEN")
159159

160-
dp = Dispatcher()
160+
dp = Dispatcher()
161161

162162

163-
# Command handler
164-
@dp.message(Command("start"))
165-
async def command_start_handler(message: Message) -> None:
166-
await message.answer("Hello! I'm a bot created with aiogram.")
163+
# Command handler
164+
@dp.message(Command("start"))
165+
async def command_start_handler(message: Message) -> None:
166+
await message.answer("Hello! I'm a bot created with aiogram.")
167167

168168

169-
# Run the bot
170-
async def main() -> None:
171-
bot = Bot(token=TOKEN)
172-
await dp.start_polling(bot)
169+
# Run the bot
170+
async def main() -> None:
171+
bot = Bot(token=TOKEN)
172+
await dp.start_polling(bot)
173173

174174

175-
if __name__ == "__main__":
176-
asyncio.run(main())
175+
if __name__ == "__main__":
176+
asyncio.run(main())
177177
{% endhighlight %}
178178
</div>
179179
</div>

_posts/2025-03-08-introducing-new-site.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
---
2+
title: 'aiogram''s New Website: Improved Access to Documentation, GitHub, and More'
23
layout: post
3-
title: "aiogram's New Website: Improved Access to Documentation, GitHub, and More"
4-
date: 2025-03-08 20:12:00 +0200
4+
date: '2025-03-08 20:12:00 +0200'
55
author_id: aiogram_team
6-
tags: [ update, news, community ]
6+
tags:
7+
- update
8+
- news
9+
- community
710
---
811

912
We're excited to announce that aiogram has a brand-new website designed to make your development
@@ -70,3 +73,8 @@ If you have suggestions for further improvements or content you'd like to see on
7073
please reach out through our GitHub issues or community channels.
7174

7275
Thank you for being part of the aiogram community!
76+
77+
78+
```python
79+
print("Hello, World!")
80+
```

0 commit comments

Comments
 (0)