Skip to content

Commit 15097ff

Browse files
committed
better RSS
1 parent 6d3f851 commit 15097ff

File tree

3 files changed

+85
-17
lines changed

3 files changed

+85
-17
lines changed

Tools.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@
1717

1818
## AI-Coding Extensions for IDEs
1919

20-
| Tool | Description |
21-
| --------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
22-
| [Cline](https://github.com/cline/cline) | A VS Code extension that integrates AI-powered agentic coding assistance. Has built-in MCP Marketplace. |
23-
| [RooCode](https://github.com/RooVetGit/Roo-Code) | An extension (fork of Cline) created by a Roo that adds AI-powered code generation capabilities to VS Code. |
24-
| ![icon](https://www.google.com/s2/favicons?domain=continue.dev&sz=24) [Continue.dev](https://www.continue.dev/) | An open-source AI coding assistant for IDEs that helps accelerate software development. It offers features like code generation, refactoring, and debugging assistance. |
25-
| ![icon](https://www.google.com/s2/favicons?domain=qodo.ai&sz=24) [qodo](https://www.qodo.ai/) | Agentic AI for testing, reviewing, and writing code—continuous quality at every step. |
26-
| ![icon](https://www.google.com/s2/favicons?domain=supermaven.com&sz=24) [Supermaven](https://supermaven.com/) | Supermaven is VS Code, JetBrains IDEs, and Neovim extension that lets you write code 2x faster with AI. |
27-
| ![icon](https://www.google.com/s2/favicons?domain=augmentcode.com&sz=24) [augment code](https://www.augmentcode.com/) | The first AI coding assistant built for professional software engineers and large codebases. |
28-
| ![icon](https://www.google.com/s2/favicons?domain=sourcegraph.com&sz=24) [Sourcegraph Cody](https://sourcegraph.com/cody) | The enterprise AI code assistant. Share and reuse prompts to automate tasks and promote quality and best practices for all of your devs. |
29-
| ![icon](https://www.google.com/s2/favicons?domain=gitlab.com&sz=24) [GitLab Duo](https://about.gitlab.com/gitlab-duo/) | From planning and coding to securing and deploying, Duo is the only AI solution that supports developers at every stage of their workflow. |
30-
| [Amazon Q Developer](https://aws.amazon.com/q/developer/) | Amazon Q Developer is plugin that provides you with code recommendations in real time and is an expert on AWS and is in the AWS Management Console. |
31-
| ![icon](https://www.google.com/s2/favicons?domain=codeassist.google&sz=24) [Gemini Code Assist](https://codeassist.google/) | Gemini Code Assist brings the power of Gemini 2.0 to your IDE at no cost, with a chat interface that is aware of your code, automatic code completions as you write, and generation and transformation of full functions or files on demand. |
20+
| Tool | Description |
21+
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
22+
| [Cline](https://github.com/cline/cline) | A VS Code extension that integrates AI-powered agentic coding assistance. Has built-in MCP Marketplace. |
23+
| [RooCode](https://github.com/RooVetGit/Roo-Code) | An extension (fork of Cline) created by a Roo that adds AI-powered code generation capabilities to VS Code. |
24+
| ![icon](https://www.google.com/s2/favicons?domain=continue.dev&sz=24) [Continue.dev](https://www.continue.dev/) | An open-source AI coding assistant for IDEs that helps accelerate software development. It offers features like code generation, refactoring, and debugging assistance. |
25+
| ![icon](https://www.google.com/s2/favicons?domain=qodo.ai&sz=24) [qodo](https://www.qodo.ai/) | Agentic AI for testing, reviewing, and writing code—continuous quality at every step. |
26+
| ![icon](https://www.google.com/s2/favicons?domain=supermaven.com&sz=24) [Supermaven](https://supermaven.com/) | Supermaven is VS Code, JetBrains IDEs, and Neovim extension that lets you write code 2x faster with AI. |
27+
| ![icon](https://www.google.com/s2/favicons?domain=augmentcode.com&sz=24) [augment code](https://www.augmentcode.com/) | The first AI coding assistant built for professional software engineers and large codebases. |
28+
| ![icon](https://www.google.com/s2/favicons?domain=sourcegraph.com&sz=24) [Sourcegraph Cody](https://sourcegraph.com/cody) | The enterprise AI code assistant. Share and reuse prompts to automate tasks and promote quality and best practices for all of your devs. |
29+
| ![icon](https://www.google.com/s2/favicons?domain=gitlab.com&sz=24) [GitLab Duo](https://about.gitlab.com/gitlab-duo/) | From planning and coding to securing and deploying, Duo is the only AI solution that supports developers at every stage of their workflow. |
30+
| [Amazon Q Developer](https://aws.amazon.com/q/developer/) | Amazon Q Developer is plugin that provides you with code recommendations in real time and is an expert on AWS and is in the AWS Management Console. |
31+
| [Gemini Code Assist](https://codeassist.google/) | Gemini Code Assist brings the power of Gemini 2.0 to your IDE, with a chat interface that is aware of your code, automatic code completions as you write, and generation and transformation of full functions or files on demand. |
3232

3333
## AI-Enhanced Development Tools
3434

www/compile.js

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -638,10 +638,22 @@ function generateMenu(activeMenu, posts = [], currentMonth = '') {
638638
${menuItems.map(item => {
639639
const isActive = activeMenu === item.id;
640640
const itemHtml = `
641-
<a href="${item.path}"
642-
class="${isActive ? 'active' : ''}">
643-
${item.text}
644-
</a>
641+
<span style="display: flex; align-items: center;">
642+
<a href="${item.path}"
643+
class="${isActive ? 'active' : ''}">
644+
${item.text}
645+
</a>
646+
${(item.id === 'index' || item.id === 'ukr') ? `<a href="/${item.id === 'ukr' ? 'ua/' : ''}feed.xml"
647+
class="rss-link"
648+
title="RSS Feed"
649+
target="_blank">
650+
<svg viewBox="0 0 8 8" width="12" height="12">
651+
<circle cx="2" cy="6" r="1" fill="currentColor"/>
652+
<path d="m 1,4 a 3,3 0 0 1 3,3 h 1 a 4,4 0 0 0 -4,-4 z" fill="currentColor"/>
653+
<path d="m 1,2 a 5,5 0 0 1 5,5 h 1 a 6,6 0 0 0 -6,-6 z" fill="currentColor"/>
654+
</svg>
655+
</a>` : ''}
656+
</span>
645657
`;
646658
647659
if (isActive && item.showArchive && posts.length > 0) {
@@ -759,6 +771,36 @@ function createSimpleContent(content) {
759771
</div>`;
760772
}
761773

774+
function prepareContentForRss(content, language) {
775+
// Заменяем относительные URL на абсолютные
776+
let processedContent = content;
777+
778+
// Обрабатываем изображения
779+
processedContent = processedContent.replace(/src="\/img\//g, `src="${siteUrl}img/`);
780+
processedContent = processedContent.replace(/src="img\//g, `src="${siteUrl}img/`);
781+
processedContent = processedContent.replace(/src="\/audio\//g, `src="${siteUrl}audio/`);
782+
processedContent = processedContent.replace(/src="audio\//g, `src="${siteUrl}audio/`);
783+
784+
// Обрабатываем ссылки, но не трогаем абсолютные URL
785+
processedContent = processedContent.replace(/href="\/(?!(http|https):\/\/)/g, `href="${siteUrl}`);
786+
787+
// Заменяем lite-youtube на обычные ссылки на YouTube
788+
const liteYoutubeRegex = /<lite-youtube[^>]*videoid="([^"]+)"[^>]*>.*?<\/lite-youtube>/g;
789+
processedContent = processedContent.replace(liteYoutubeRegex, (match, videoId) => {
790+
const text = language === 'uk' ? 'Відео на YouTube' : 'Video on YouTube';
791+
return `<p><a href="https://www.youtube.com/watch?v=${videoId}">${text}: https://www.youtube.com/watch?v=${videoId}</a></p>`;
792+
});
793+
794+
// Обрабатываем другие относительные пути в атрибутах
795+
const attributesWithPaths = ['src', 'href', 'poster', 'data-src'];
796+
attributesWithPaths.forEach(attr => {
797+
const regex = new RegExp(`${attr}="/((?!${siteUrl.replace(/https?:\/\//g, '')})([^"]*))`, 'g');
798+
processedContent = processedContent.replace(regex, `${attr}="${siteUrl}$1`);
799+
});
800+
801+
return processedContent;
802+
}
803+
762804
function generateRssFeed(posts, language) {
763805
const lang = language === 'uk' ? 'uk' : 'en';
764806
const feedUrl = language === 'uk' ? `${siteUrl}ua/feed.xml` : `${siteUrl}feed.xml`;
@@ -772,13 +814,16 @@ function generateRssFeed(posts, language) {
772814
const postUrl = language === 'uk' ?
773815
`${siteUrl}ua/${monthKey}/${postSlug}/` :
774816
`${siteUrl}${monthKey}/${postSlug}/`;
817+
818+
// Обрабатываем контент для RSS
819+
const rssContent = prepareContentForRss(post.content, language);
775820

776821
return `
777822
<item>
778823
<title><![CDATA[${post.title.date} ${post.title.time}]]></title>
779824
<link>${postUrl}</link>
780825
<guid isPermaLink="true">${postUrl}</guid>
781-
<description><![CDATA[${post.content}]]></description>
826+
<description><![CDATA[${rssContent}]]></description>
782827
<pubDate>${new Date(post.date).toUTCString()}</pubDate>
783828
</item>`;
784829
}).join('\n');

www/template/styles.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,3 +906,26 @@ body {
906906
margin: 8px 0;
907907
}
908908
}
909+
910+
.rss-link {
911+
display: inline-flex;
912+
align-items: center;
913+
margin-left: 6px;
914+
opacity: 0.6;
915+
transition: opacity 0.2s;
916+
}
917+
918+
.rss-link:hover {
919+
opacity: 1;
920+
background-color: transparent !important;
921+
}
922+
923+
.menu a.rss-link {
924+
padding: 0;
925+
margin-top: 1px;
926+
position: relative;
927+
top: 0;
928+
display: inline-flex;
929+
float: right;
930+
background-color: transparent !important;
931+
}

0 commit comments

Comments
 (0)