diff --git a/.gitignore b/.gitignore index 4f59cf1..056d15a 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,10 @@ terraform.rc /playwright/.cache/ screenshots/ +# RSS Feed +/Utils/RSSfeed/test-results/ +/Utils/RSSfeed/playwright-report/ + # Build artifacts *.egg-info/ dist/ diff --git a/About the owner.md b/About the owner.md index 959212d..7b05241 100644 --- a/About the owner.md +++ b/About the owner.md @@ -2,7 +2,7 @@ **TLDR: Software Engineer** -![[marcin_kwiatkowski2025.jpg]] +![marcin_kwiatkowski2025](marcin_kwiatkowski2025.jpg) Hi! I am Marcin Kwiatkowski! diff --git a/Atlas/Engineering/Cybersecurity/Encryption.md b/Atlas/Engineering/Cybersecurity/Encryption.md index dc17e1d..c470808 100644 --- a/Atlas/Engineering/Cybersecurity/Encryption.md +++ b/Atlas/Engineering/Cybersecurity/Encryption.md @@ -1,7 +1,7 @@ It's a process of making readable data unreadable. -Encryption converts [[Plaintext]] into [[Ciphertext]] +Encryption converts [Plaintext](Plaintext.md) into [Ciphertext](Ciphertext.md) ## Encryption process diff --git a/Atlas/Engineering/Cybersecurity/Key definitions/Cipher.md b/Atlas/Engineering/Cybersecurity/Key definitions/Cipher.md index e00bf22..0854bce 100644 --- a/Atlas/Engineering/Cybersecurity/Key definitions/Cipher.md +++ b/Atlas/Engineering/Cybersecurity/Key definitions/Cipher.md @@ -1,6 +1,6 @@ Is an algorithm used for encrypting and decrypting data. -It converts [[Plaintext]] into [[Ciphertext]]. +It converts [Plaintext](Plaintext.md) into [Ciphertext](Ciphertext.md). Plaintext is readable for human data. Ciphertext is encrypted and unreadable. diff --git a/Atlas/Engineering/Cybersecurity/Key definitions/Ciphertext.md b/Atlas/Engineering/Cybersecurity/Key definitions/Ciphertext.md index ce2582b..49455e4 100644 --- a/Atlas/Engineering/Cybersecurity/Key definitions/Ciphertext.md +++ b/Atlas/Engineering/Cybersecurity/Key definitions/Ciphertext.md @@ -2,7 +2,7 @@ Can be named also cryptogram. Ciphertext is an encrypted version of plaintext. -It's an output of the [[Encryption|Encryption]] algorithm. +It's an output of the [encryption](Encryption.md) algorithm. Ciphertext appears as unreadable string of characters. Example: "5d41402abc4b2a76b9719d911017c592" diff --git a/Atlas/Engineering/Cybersecurity/Key definitions/Monoalphabetic rotation ciphers.md b/Atlas/Engineering/Cybersecurity/Key definitions/Monoalphabetic rotation ciphers.md index 02ea8cf..9b75c54 100644 --- a/Atlas/Engineering/Cybersecurity/Key definitions/Monoalphabetic rotation ciphers.md +++ b/Atlas/Engineering/Cybersecurity/Key definitions/Monoalphabetic rotation ciphers.md @@ -1,7 +1,7 @@ A type of substitution cipher. -It shifts a letter in a [[Plaintext]] by a fixed number of position in the alphabet to produce the [[Ciphertext]] +It shifts a letter in a [plaintext](Plaintext.md) by a fixed number of position in the alphabet to produce the [ciphertext](Ciphertext.md) ```mermaid flowchart LR diff --git a/Atlas/Engineering/Cybersecurity/Key definitions/Plaintext.md b/Atlas/Engineering/Cybersecurity/Key definitions/Plaintext.md index 02d6145..3889993 100644 --- a/Atlas/Engineering/Cybersecurity/Key definitions/Plaintext.md +++ b/Atlas/Engineering/Cybersecurity/Key definitions/Plaintext.md @@ -2,6 +2,6 @@ Data in the original and readable form. It can be text, file, message and any other type of data that human can understand. -Plaintext is an input to an [[Encryption]] algorithm. +Plaintext is an input to an [encryption](Encryption.md) algorithm. -# Cybersecurity #TerminologyDefinitions #Beginner +#Cybersecurity #TerminologyDefinitions #Beginner diff --git a/Atlas/Engineering/Cybersecurity/Key definitions/polyalphabetic substitution cipher.md b/Atlas/Engineering/Cybersecurity/Key definitions/polyalphabetic substitution cipher.md index e425d9a..b0141e7 100644 --- a/Atlas/Engineering/Cybersecurity/Key definitions/polyalphabetic substitution cipher.md +++ b/Atlas/Engineering/Cybersecurity/Key definitions/polyalphabetic substitution cipher.md @@ -1,6 +1,6 @@ A cryptographic method that uses multiple substitution alphabets to encrypt plaintext. -In [[Monoalphabetic rotation ciphers]] each letter in the [[Plaintext]] is always substituted with the same letter in [[Ciphertext]] +In [monoalphabetic rotation ciphers](Monoalphabetic%20rotation%20ciphers.md) each letter in the [plaintext](Plaintext.md) is always substituted with the same letter in [ciphertext](Ciphertext.md) In a polyalphabetic substitution cipher, substitution depends on the position of the letter and a key. This makes polyalphabetic substitution ciphers more secure. diff --git a/Atlas/Engineering/Cybersecurity/symmetric encryption/Data Encryption Standard (DES).md b/Atlas/Engineering/Cybersecurity/symmetric encryption/Data Encryption Standard (DES).md index e352722..4f03329 100644 --- a/Atlas/Engineering/Cybersecurity/symmetric encryption/Data Encryption Standard (DES).md +++ b/Atlas/Engineering/Cybersecurity/symmetric encryption/Data Encryption Standard (DES).md @@ -20,4 +20,4 @@ terms: #Cybersecurity #TerminologyDefinitions #ConceptExplanation #Beginner -[^1]: [[Cryptography and network security principles and practice (fifth edition) by William Stallings]] +[^1]: [Cryptography and network security principles and practice (fifth edition) by William Stallings](Cryptography%20and%20network%20security%20principles%20and%20practice%20(fifth%20edition)%20by%20William%20Stallings.md) diff --git a/Blog/2025/Historical cryptography algorithms.md b/Blog/2025/Historical cryptography algorithms.md index 3420a9d..1c7e807 100644 --- a/Blog/2025/Historical cryptography algorithms.md +++ b/Blog/2025/Historical cryptography algorithms.md @@ -2,7 +2,7 @@ date: 2025-03-28 title: Historical cryptography algorithms --- -My first task on the [Cybersecurity learning roadmap](Cybersecurity%20learning%20roadmap.md) course at studies was about experimenting with historical cryptography algorithms. +My first task on the cybersecuirty learning roadmap course at studies was about experimenting with historical cryptography algorithms. I was sitting in the computer room, it was quite stuffy, and around me were 30 other students. It was the third class of the day. The lecturer came in, who looked like a rather strict gentleman. He explained to us briefly what the course would look like and what the rules were for passing. @@ -54,7 +54,7 @@ Ok, so at this moment I can experiment with Cryptool and learn about crypto a bi In the scope of task I had: *Cesar*, *Vigenere*, *Hill* and *XOR*. Let's take a closer look at them -### Caesar's [[Cipher]] +### Caesar's cipher It's one of the oldest and simplest [Encryption](Encryption.md) algorithm invented (or at least associated with) Julius Caesar. @@ -252,7 +252,7 @@ Uh, a lot of theory and it's not easy, is it? Let's try to see how it work in pr ## Tasks & Experiments -### 1. Compare plaintext [[Entropy]] values ​​for Polish, English and one other selected language +### 1. Compare plaintext entropy values ​​for Polish, English and one other selected language I used these texts: @@ -298,7 +298,7 @@ Because entropy is a a measure of unpredictability and polish had has the best s Based on that, polish is a good language for cryptography use cases. -### 2. Compare the entropy values ​​of [[Plaintext]] and cryptogram depending on the algorithm (Caesar, Vigenere, Hill) +### 2. Compare the entropy values ​​of pllaintext and cryptogram depending on the algorithm (Caesar, Vigenere, Hill) I used my polish plaintext and encrypted it using these trhee algorithms. diff --git a/Blog/Archive/Frontend/Graphql/2 ways of handling GraphQL errors in Apollo Client.md b/Blog/Archive/Frontend/Graphql/2 ways of handling GraphQL errors in Apollo Client.md index 14b3cea..86c3803 100644 --- a/Blog/Archive/Frontend/Graphql/2 ways of handling GraphQL errors in Apollo Client.md +++ b/Blog/Archive/Frontend/Graphql/2 ways of handling GraphQL errors in Apollo Client.md @@ -85,7 +85,7 @@ Network errors occur when there are communication problems with the GraphQL serv ### Error policies -By default, the [[Introduction to the Apollo local state and reactive variables|Apollo]] server returns partial data when there is a resolver error, but you can change this behavior by changing the error policy. There are three error policies: +By default, the [Apollo](Introduction%20to%20the%20Apollo%20local%20state%20and%20reactive%20variables.md) server returns partial data when there is a resolver error, but you can change this behavior by changing the error policy. There are three error policies: - **none** \- the default one - if there are errors the `graphQLErrorsthe` field is populated and the `data` field is set to undefined (even if the server returns some data in response) @@ -99,7 +99,7 @@ You can specify error policy globally on or query/mutation level. ##### Global error policy -You can set an error policy for [[How to mock GraphQL queries and mutations|queries and mutations]] using the `defaultOptions` object in the ApolloClient constructor. The example below shows an error policy all set for queries and an ignore policy for mutations. +You can set an error policy for queries and mutations using the `defaultOptions` object in the ApolloClient constructor. The example below shows an error policy all set for queries and an ignore policy for mutations. ```javascript import { ApolloClient, InMemoryCache } from "@apollo/client"; @@ -134,7 +134,7 @@ To implement application-level error handling, we need to use a functionality ca The Apollo Link library helps you customize the data flow between Apollo Client and your **GraphQL** server. You can define your client's network behavior as a chain of **link** objects that execute in a **sequence**. -Each link should represent either a self-contained modification to a [[How to create a quick search component using Apollo lazy query|GraphQL]] operation or a side effect (such as logging). +Each link should represent either a self-contained modification to a GraphQL operation or a side effect (such as logging). Take a look at a sample implementation of application-level error handling. diff --git a/Blog/Archive/Frontend/Graphql/How to create a quick search component using Apollo lazy query.md b/Blog/Archive/Frontend/Graphql/How to create a quick search component using Apollo lazy query.md index 65e175a..e0e2fea 100644 --- a/Blog/Archive/Frontend/Graphql/How to create a quick search component using Apollo lazy query.md +++ b/Blog/Archive/Frontend/Graphql/How to create a quick search component using Apollo lazy query.md @@ -263,7 +263,7 @@ Then I use that function in effect. Before calling, I check if the search query ### graphQL query -The last thing we need to do is create a [[The full-stack guide to the GraphQL query|graphQl query]] used by the useQuickSearchSuggestions hook. +The last thing we need to do is create a graphQl query used by the useQuickSearchSuggestions hook. ```javascript export const GET_QUICK_SEARCH_SUGGESTIONS = gql` @@ -315,6 +315,6 @@ Apollo client provides a cache mechanism called InMemoryCache. Thanks to that, t ### Handling GraphQL errors -Lazy query error handling is pretty the same as when you use the **useQuery** hook. Please follow [[2 ways of handling GraphQL errors in Apollo Client|this article]] if you want to get more about GraphQL errors. +Lazy query error handling is pretty the same as when you use the **useQuery** hook. #WebDevelopment #FrontendDevelopment #JavaScript #React #GraphQL #ApolloClient #ReactBootstrap #Tutorial #ConceptExplanation #BestPractices #Intermediate #API diff --git a/Blog/Archive/Frontend/Graphql/How to mock GraphQL queries and mutations.md b/Blog/Archive/Frontend/Graphql/How to mock GraphQL queries and mutations.md index 0c3f681..1798ed0 100644 --- a/Blog/Archive/Frontend/Graphql/How to mock GraphQL queries and mutations.md +++ b/Blog/Archive/Frontend/Graphql/How to mock GraphQL queries and mutations.md @@ -804,7 +804,7 @@ It's pretty simple. You should: ## Summary -In this article, I showed you how to mock GraphQL queries and mutations. Compared to a REST API, mocking GraphQL queries is much easier. The subsequent transition to real data only really involves a change in [[The full-stack guide to the GraphQL query|GraphQL queries]] and resolvers’ removal. In my opinion, mocking data in GraphQL is much easier than in REST, which is unquestionably beneficial for everyone. +In this article, I showed you how to mock GraphQL queries and mutations. Compared to a REST API, mocking GraphQL queries is much easier. The subsequent transition to real data only really involves a change in GraphQL queries and resolvers’ removal. In my opinion, mocking data in GraphQL is much easier than in REST, which is unquestionably beneficial for everyone. When you want to mock some fields or operations on the client side using Apollo Client, please follow these steps: diff --git a/Blog/Archive/Frontend/Graphql/How to use GraphQL mutations in React and Apollo Client.md b/Blog/Archive/Frontend/Graphql/How to use GraphQL mutations in React and Apollo Client.md index 72b2a4d..0a7620a 100644 --- a/Blog/Archive/Frontend/Graphql/How to use GraphQL mutations in React and Apollo Client.md +++ b/Blog/Archive/Frontend/Graphql/How to use GraphQL mutations in React and Apollo Client.md @@ -4,7 +4,7 @@ title: How to use GraphQL mutations in React and Apollo Client --- *Last updated: 27/10/2022* -In one of my previous articles, I described [[The full-stack guide to the GraphQL query|GraphQL queries]]. Today I would like to show you how to work with GraphQL mutations. +In one of my previous articles, I described GraphQL queries. Today I would like to show you how to work with GraphQL mutations. ## What is a mutation in GraphQL? diff --git a/Blog/Archive/Frontend/Graphql/Introduction to the Apollo local state and reactive variables.md b/Blog/Archive/Frontend/Graphql/Introduction to the Apollo local state and reactive variables.md index f61813c..524d896 100644 --- a/Blog/Archive/Frontend/Graphql/Introduction to the Apollo local state and reactive variables.md +++ b/Blog/Archive/Frontend/Graphql/Introduction to the Apollo local state and reactive variables.md @@ -729,6 +729,6 @@ useEffect(() => { ## Summary -Today I showed you two techniques for managing local data in Apollo. Local-only fields and reactive variables. Those mechanisms provide a lot of flexibility, and they should be considered when architecting state management in your React application. In addition, I recommend reading about [[How to mock GraphQL queries and mutations]] +Today I showed you two techniques for managing local data in Apollo. Local-only fields and reactive variables. Those mechanisms provide a lot of flexibility, and they should be considered when architecting state management in your React application. #WebDevelopment #FrontendDevelopment #ProgrammingFundamentals #JavaScript #React #Apollo #GraphQL #REST #Tutorial #DeepDive #ConceptExplanation #Intermediate #StateManagement #DataPipeline #APIIntegration diff --git a/Blog/Archive/Frontend/Magento/Getting started with Magento PWA Studio targetables.md b/Blog/Archive/Frontend/Magento/Getting started with Magento PWA Studio targetables.md index e61ae32..32e935e 100644 --- a/Blog/Archive/Frontend/Magento/Getting started with Magento PWA Studio targetables.md +++ b/Blog/Archive/Frontend/Magento/Getting started with Magento PWA Studio targetables.md @@ -328,7 +328,7 @@ const ShortDescription = props => { }; ``` -Note: Because I want to keep this example simple, I do not handle errors here. If you would to take a look at how error handling can be done, [[2 ways of handling GraphQL errors in Apollo Client| check this article, please.]] +Note: Because I want to keep this example simple, I do not handle errors here. Now we can use data returned by the useQuery hook. For example: data.products.items\[0\].short_description.html, but this is not perfect. diff --git a/Blog/Archive/Frontend/Magento/How to add support for Category Landing Pages to PWA Studio.md b/Blog/Archive/Frontend/Magento/How to add support for Category Landing Pages to PWA Studio.md index 7ecb1ad..490947b 100644 --- a/Blog/Archive/Frontend/Magento/How to add support for Category Landing Pages to PWA Studio.md +++ b/Blog/Archive/Frontend/Magento/How to add support for Category Landing Pages to PWA Studio.md @@ -229,7 +229,7 @@ export const useImprovedCategoryContent = (props) => { }; ``` -Note: Because I want to keep this example simple, I do not handle errors here. If you would to take a look at how error handling can be done, [[2 ways of handling GraphQL errors in Apollo Client|check this article, please.]] +Note: Because I want to keep this example simple, I do not handle errors here. That hook receives one parameter - categoryId, and it gets data from the Magento backend using the already declared **GET_CATEGORY_LANDING_PAGE** query. diff --git a/Blog/Archive/Frontend/Software architecture/Hexagonal architecture (ports and adapters) - pros and cons.md b/Blog/Archive/Frontend/Software architecture/Hexagonal architecture (ports and adapters) - pros and cons.md index e48640b..4e7c493 100644 --- a/Blog/Archive/Frontend/Software architecture/Hexagonal architecture (ports and adapters) - pros and cons.md +++ b/Blog/Archive/Frontend/Software architecture/Hexagonal architecture (ports and adapters) - pros and cons.md @@ -14,8 +14,6 @@ In hexagonal architecture, the application consists of three main parts: 3. **Business logic** - the central part of the application that processes information passed by ports and adapters. Business logic is isolated from implementation details, which enables easy interchangeability of adapters and ports without changes to the business logic. -![[hexagonal-architecture.png]] - --- ## Ports @@ -316,8 +314,6 @@ Even databases and external services need an application to function. In this ca ## Dependency inversion principle -![[Dependency inversion.png]] - Dependency Inversion Principle states that high-level modules that implement business logic should not depend on low-level modules. This means that interfaces should be defined by high-level modules. This makes the system more flexible and easier to modify, because changes made in one module will not affect the other modules, as long as the interfaces remain unchanged. --- diff --git a/Blog/Archive/Frontend/Vue/Vue component here, Vue components there. Components everywhere!.md b/Blog/Archive/Frontend/Vue/Vue component here, Vue components there. Components everywhere!.md index e2e4dd9..f7fc977 100644 --- a/Blog/Archive/Frontend/Vue/Vue component here, Vue components there. Components everywhere!.md +++ b/Blog/Archive/Frontend/Vue/Vue component here, Vue components there. Components everywhere!.md @@ -4,8 +4,7 @@ title: Vue component here, Vue components there. Components everywhere --- *Published at 27/01/2023* - -Previously I showed you [[How to get started with Vue (part1)]], and I have promised that there will be a second part, and here you go! +Previously I showed you how to get started with Vue, and I have promised that there will be a second part, and here you go! Spoiler alert: there will even be a third series, but to the point! diff --git a/Projects/Nitrodigest/Docs/Guides/Summarizing a Single File.md b/Projects/Nitrodigest/Docs/Guides/Summarizing a Single File.md index ad031fb..dd71f21 100644 --- a/Projects/Nitrodigest/Docs/Guides/Summarizing a Single File.md +++ b/Projects/Nitrodigest/Docs/Guides/Summarizing a Single File.md @@ -1,7 +1,7 @@ --- permalink: projects/nitrodigest/docs/guides/summarizing-a-single-file --- -This guide covers how to process individual files with NitroDigest in detail. While the [[Quickstart]] shows the basic workflow, this page explores different options, file types, and common scenarios you'll encounter when summarizing single files. +This guide covers how to process individual files with NitroDigest in detail. While the [Quickstart](Quickstart.md) shows the basic workflow, this page explores different options, file types, and common scenarios you'll encounter when summarizing single files. ## Basic Command Structure diff --git a/Projects/Nitrodigest/Journals/2. Split text into chunks part 1.md b/Projects/Nitrodigest/Journals/2. Split text into chunks part 1.md index c06f0ea..fbbff63 100644 --- a/Projects/Nitrodigest/Journals/2. Split text into chunks part 1.md +++ b/Projects/Nitrodigest/Journals/2. Split text into chunks part 1.md @@ -8,7 +8,7 @@ journal-index: 2 - [x] #NitroDigest read and answer in discussion about OOP: [https://github.com/Frodigo/garage/discussions/64] - [x] #NitroDigest research about chunked prompts [https://github.com/Frodigo/garage/issues/97] -- [x] #Garage add info about NitroDigest project to the [[Now]] page +- [x] #Garage add info about NitroDigest project to the now page ### Notes @@ -43,5 +43,3 @@ journal-index: 2 - NLTK: - [https://github.com/nltk/nltk](https://github.com/nltk/nltk) - [https://www.nltk.org](https://www.nltk.org) - -Continuation: [[6. 2025-04-23 - split text into chunks part 2]] diff --git a/Projects/Nitrodigest/Journals/3. Split text into chunks part 2.md b/Projects/Nitrodigest/Journals/3. Split text into chunks part 2.md index f8b0df4..3904478 100644 --- a/Projects/Nitrodigest/Journals/3. Split text into chunks part 2.md +++ b/Projects/Nitrodigest/Journals/3. Split text into chunks part 2.md @@ -25,5 +25,3 @@ journal-index: 6 - [https://medium.com/@ravindul97/sentence-splitting-in-nlp-2948c90de4a2] - [https://www.nltk.org/api/nltk.tokenize.sent_tokenize.html] - -Continuation: [[7. 2025-04-24 - split text into chunks part 3]] diff --git a/Projects/Nitrodigest/Journals/6. Learn about CLI tools best practices part 1.md b/Projects/Nitrodigest/Journals/6. Learn about CLI tools best practices part 1.md index 3f31401..7d4db5a 100644 --- a/Projects/Nitrodigest/Journals/6. Learn about CLI tools best practices part 1.md +++ b/Projects/Nitrodigest/Journals/6. Learn about CLI tools best practices part 1.md @@ -10,7 +10,7 @@ journal-index: 9 ### Notes -- [[Notes from CLIG]] +- [Notes from CLIG](Notes%20from%20CLIG.md) ### Challenges & solutions diff --git a/Projects/Nitrodigest/Journals/7. Learn about CLI tools best practices part 2.md b/Projects/Nitrodigest/Journals/7. Learn about CLI tools best practices part 2.md index 57c3a32..140a386 100644 --- a/Projects/Nitrodigest/Journals/7. Learn about CLI tools best practices part 2.md +++ b/Projects/Nitrodigest/Journals/7. Learn about CLI tools best practices part 2.md @@ -11,7 +11,7 @@ journal-index: 11 ### Notes -- busy day, but I was able to read all content from [clig.dev](https://clig.dev) and make notes [[Notes from CLIG]] #NitroDigest +- busy day, but I was able to read all content from [clig.dev](https://clig.dev) and make notes [Notes from CLIG](Notes%20from%20CLIG.md) #NitroDigest ### Challenges & solutions diff --git a/Projects/Nitrodigest/Journals/9. Research & development.md b/Projects/Nitrodigest/Journals/9. Research & development.md index 3e86eb9..50a805e 100644 --- a/Projects/Nitrodigest/Journals/9. Research & development.md +++ b/Projects/Nitrodigest/Journals/9. Research & development.md @@ -13,7 +13,6 @@ journal-index: 13 ### Notes -- [[I found another example that AI is not super useful]] - Crosspost is a really interesting tool that allows to oublish content directly from CLI - I was able to publish to Mastodon using this tool - started playing with postmarketOS diff --git a/Projects/Testtrack/Microproducts ideas.md b/Projects/Testtrack/Microproducts ideas.md index 3ce4efc..9ac2f9f 100644 --- a/Projects/Testtrack/Microproducts ideas.md +++ b/Projects/Testtrack/Microproducts ideas.md @@ -1,3 +1,3 @@ - tool that creates diagrams based on text and insert these diagrams into text - Obsidian RSS Feed generator - plugin to obsidian that allows to create a custom RSS feed based on notes -- tool that creates a personalized learning roadmap similar to those I created manually, e.g. [[Machine learning roadmap|Machine learning roadmap]] +- tool that creates a personalized learning roadmap similar to those I created manually, e.g. [machine-learning-roadmap](machine-learning-roadmap.md) diff --git a/Utils/RSSfeed/feed.xml.js b/Utils/RSSfeed/feed.xml.js index 58fd714..7b592ae 100644 --- a/Utils/RSSfeed/feed.xml.js +++ b/Utils/RSSfeed/feed.xml.js @@ -24,21 +24,7 @@ function configureMarkedRenderer() { ? text.text || text.title || hrefStr : String(text || hrefStr); - // Handle wiki links - if (hrefStr.startsWith("[[")) { - const linkText = hrefStr.slice(2, -2); - const url = generateUrl(null, linkText); - return `${textStr}`; - } - - // For regular links, extract the last part of the URL for the text and decode it - if (hrefStr.startsWith("https://frodigo.com/")) { - const lastPart = hrefStr.split("/").pop(); - const decodedText = decodeURIComponent(lastPart.replace(/\+/g, " ")); - return `${decodedText}`; - } - - // For regular links, ensure proper formatting + // Return standard link return `${textStr}`; }; @@ -76,10 +62,9 @@ const baseConfig = { "dist", ".next", "priv", + "src", + "venv", ], - categories: { - "Software architecture": "Garage/Software+architecture", - }, }; // Feed-specific configurations @@ -138,53 +123,16 @@ function findMarkdownFiles(dir, fileList = [], excludeDirs) { } /** - * Generate a normalized URL from file path or link text - * @param {string|null} filePath - Path to the file - * @param {string|null} linkText - Text of a wiki link - * @returns {string} Generated URL - */ -function generateUrl(filePath, linkText = null) { - // Handle category links - if (linkText && baseConfig.categories[linkText.trim()]) { - return baseConfig.categories[linkText.trim()]; - } - - // Handle category files - if (filePath) { - const fileName = path.basename(filePath, ".md"); - if (fileName.toLowerCase() === "software architecture") { - return "Garage/Software+architecture"; - } - - // For regular files - const relativePath = path.relative(baseConfig.contentDir, filePath); - return relativePath - .replace(/\.(md)$/, "") - .replace(/\\/g, "/") - .replace(/\s+/g, "+"); - } - - // Fallback for wiki links without special handling - return linkText ? linkText.replace(/\s+/g, "+") : ""; -} - -/** - * Process markdown content to handle wiki links - * @param {string} content - Raw markdown content + * Generate a normalized URL from file path * @param {string} filePath - Path to the file - * @param {object} config - Feed configuration - * @returns {string} Processed content with links resolved + * @returns {string} Generated URL */ -function processWikiLinks(content, filePath, config) { - return content.replace(/\[\[(.*?)\]\]/g, (match, text) => { - if (text.includes("|")) { - const [link, displayText] = text.split("|"); - const url = `${config.site.site_url}/${generateUrl(null, link)}`; - return `${displayText}`; - } - const url = `${config.site.site_url}/${generateUrl(null, text)}`; - return `${text}`; - }); +function generateUrl(filePath) { + const relativePath = path.relative(baseConfig.contentDir, filePath); + return relativePath + .replace(/\.(md)$/, "") + .replace(/\\/g, "/") + .replace(/\s+/g, "+"); } /** @@ -226,7 +174,7 @@ function createFeedItem(filePath, config) { return null; } - // First convert markdown to HTML + // Convert markdown to HTML const renderer = new marked.Renderer(); renderer.link = (href, title, text) => { const hrefStr = @@ -239,24 +187,17 @@ function createFeedItem(filePath, config) { ? text.text || text.title || hrefStr : String(text || hrefStr); - if (hrefStr.startsWith("https://frodigo.com/")) { - return `${textStr}`; - } - return `${textStr}`; }; marked.setOptions({ renderer, mangle: false, headerIds: false }); const htmlContent = marked(content); - // Then process wiki links in the HTML - const processedContent = processWikiLinks(htmlContent, filePath, config); - const url = `${config.site.site_url}/${generateUrl(filePath)}`; return { title: data.title || path.basename(filePath, ".md"), - description: getDescription(processedContent, data), + description: getDescription(htmlContent, data), url: url, guid: url, categories: data.categories || [], @@ -270,7 +211,7 @@ function createFeedItem(filePath, config) { type: "image/jpeg", } : undefined, - custom_elements: [{ "content:encoded": { _cdata: processedContent } }], + custom_elements: [{ "content:encoded": { _cdata: htmlContent } }], }; } catch (error) { console.error(`Error processing file ${filePath}:`, error); @@ -526,7 +467,6 @@ if (require.main === module) { module.exports = { findMarkdownFiles, generateUrl, - processWikiLinks, getDescription, createFeedItem, generateRSSFeed,