Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/FUNDING.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Reduce exposure to npm supply-chain attacks by requiring package
# versions to be at least 14 days old before installation.
min-release-age=14
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ This project is currently in maintenance mode. This means that:
- Only critical bug fixes and security updates will be addressed.
- New feature requests are unlikely to be implemented.

## Sponsorship

If you want to support my work, you can through the following methods:

- [BTC](3Lp4pwF5nXqwFA62BYx4DSvDswyYpskBog) - 3Lp4pwF5nXqwFA62BYx4DSvDswyYpskBog
- [ETH](0xc6EB17BD7cbe5976Bfc4f845669cD66Ff340a1A2) - 0xc6EB17BD7cbe5976Bfc4f845669cD66Ff340a1A2

## Contributing

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
Expand Down
23 changes: 16 additions & 7 deletions docs/architecture/data-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ This document illustrates how data flows through Small Dev Talk from initial pag

```mermaid
flowchart TD
accTitle: Complete data flow from page load to rendered article
accDescr: A user request triggers script loading and Sentry initialization, service worker registration, article metadata fetch, a URL decision between homepage and single article, article content fetch, page metadata update, Showdown Markdown to HTML rendering, caching, error tracking, and final display to the user.
subgraph Request["User Request"]
A1["User visits index.html<br/>or clicks article link"]
A2["URL contains query parameter<br/>?ArticleName"]
Expand Down Expand Up @@ -121,6 +123,8 @@ When [index.html](../../index.html) loads:

```mermaid
sequenceDiagram
accTitle: Article data retrieval sequence
accDescr: After the browser completes loading, ArticleFiller fetches articleData.json from /src/articleArchive/, stores it in the articleData static property, then calls callArticle().
participant Browser
participant AF as ArticleFiller
participant Server
Expand All @@ -138,6 +142,8 @@ The `callArticle()` method determines what to display:

```mermaid
flowchart TD
accTitle: Article loading logic in callArticle()
accDescr: callArticle() checks for a query string. No query or multiple parameters shows the homepage. A single article triggers grabArticle, which hides the featured and display sections, shows articleBody, fetches the Markdown, converts it with Showdown, updates metadata, and renders to articleBody.
A["callArticle()"] --> B{"URL has<br/>query string?"}
B -->|No query| C["callDisplay()<br/>Show homepage"]
B -->|Has query| D["Parse article name<br/>from query"]
Expand All @@ -155,6 +161,8 @@ flowchart TD

```mermaid
flowchart TD
accTitle: Error handling flow
accDescr: A failed or invalid fetch, or a parse error, calls displayError, which logs to the console and reports to Sentry, then shows an error UI with a refresh button and lets the user return to the homepage.
A["Fetch article"] -->|Success| B["Parse & render"]
A -->|Fetch fails| C["displayError<br/>Log to console"]
A -->|Invalid article| C
Expand Down Expand Up @@ -183,13 +191,13 @@ twitter:description → article summary
twitter:image → article thumbnail

// 4. Structured data (Schema.org)
// updateMetaData updates only the name, description, and image keys of the
// existing WebSite object; @type is never changed.
{
"@type": "NewsArticle",
"headline": article title,
"description": article summary,
"image": article thumbnail,
"author": article author,
"datePublished": article date
"@type": "WebSite",
"name": article title + " | Small Dev Talk",
"description": article summary + " | Small Dev Talk",
"image": article thumbnail URL
}
```

Expand All @@ -199,6 +207,8 @@ ArticleFiller maintains state through static properties:

```mermaid
stateDiagram-v2
accTitle: ArticleFiller state transitions
accDescr: States move from Uninitialized to MetadataLoaded after retrieveArticleData(), then to DisplayingHome or FetchingArticle, then RenderingArticle and DisplayingArticle. A failed fetch enters ErrorState, with paths back to the homepage or a retry.
[*] --> Uninitialized
Uninitialized --> MetadataLoaded: retrieveArticleData()<br/>completes
MetadataLoaded --> DisplayingHome: callArticle()<br/>no query
Expand Down Expand Up @@ -232,5 +242,4 @@ stateDiagram-v2
See also:

- [System Architecture](./system.md)
- [Dependencies & Integrations](./dependencies.md)
- [ArticleFiller API](../api/article-filler.md)
2 changes: 2 additions & 0 deletions docs/architecture/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Small Dev Talk follows these core architectural principles:

```mermaid
graph TB
accTitle: High-level architecture
accDescr: The user browser loads index.html, which invokes the ArticleFiller class and registers the service worker. ArticleFiller reads articleData.json and the article archive, and reports to Sentry monitoring.
User[User Browser]
HTML[index.html]
AF[ArticleFiller Class]
Expand Down
4 changes: 4 additions & 0 deletions docs/architecture/system.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Small Dev Talk is a client-side static web application that loads article metada

```mermaid
graph TB
accTitle: System architecture overview
accDescr: Layered diagram showing the browser client layer (index.html entry point, CSS and Bootstrap styles, JavaScript runtime) driving the ArticleFiller core (retrieveArticleData, grabArticle, updateMetaData), which fetches articleData.json metadata and the Markdown article archive and renders content via Showdown before updating the HTML. External services include the Sentry SDK and a caching service worker, and UI libraries include Bootstrap, Showdown.js, and jQuery.
subgraph Client["Browser / Client Layer"]
HTML["index.html<br/>Entry Point"]
CSS["Cascading Style Sheets (CSS)<br/>style.css, Bootstrap"]
Expand Down Expand Up @@ -162,6 +164,8 @@ The flow below uses the Uniform Resource Locator (URL) query string to decide wh

```mermaid
sequenceDiagram
accTitle: Article loading data flow
accDescr: Sequence showing the browser calling ArticleFiller.retrieveArticleData() on page load, which fetches metadata from articleData.json and receives the article registry. callArticle() then checks the URL query string. If an article is requested, ArticleFiller fetches the Markdown file, converts it to HTML with Showdown, calls updateMetaData() to update page tags, and renders the article. Otherwise it renders the homepage article grid.
participant Browser
participant AF as ArticleFiller
participant JSON as articleData.json
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/articles.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ src/articleArchive/authorAlexanderSullivan/2013-03-26_Caravaneer2/

**Precaching Formats:**

Workbox precaches assets that match the extensions in `workbox-config.js`, including `jpg`, `jpeg`, `png`, `webp`, `gif`, `svg`, and `ico`.
Workbox precaches assets that match the extensions in `workbox-config.js`, including `jpg`, `png`, `webp`, `gif`, `svg`, and `ico`.

## Step 5: Update Service Worker Cache

Expand Down Expand Up @@ -146,7 +146,7 @@ Once validated locally:
2. Create a pull request
3. Request review
4. Merge to master
5. GitHub Actions automatically builds and deploys
5. GitHub Actions runs quality checks (Prettier, ESLint, Jest, Cypress, markdownlint, and CodeQL); there is no build step. The site is hosted on GitHub Pages (see [CNAME](../../CNAME)) and updates when changes land on master

## Related Documentation

Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Application Programming Interface (API) documentation for external usage and pub
| [jQuery](https://jquery.com/) | Document Object Model (DOM) utilities | Local copy |
| [Showdown.js](http://showdownjs.com/) | Markdown to HTML conversion | Local copy |
| [Sentry](https://sentry.io/) | Error tracking | v10.32.1 |
| [Service Workers / Workbox](https://developers.google.com/web/tools/workbox) | Precaching and caching | ^7.4.0 |
| [Jest](https://jestjs.io/) | Unit testing | ^30.2.0 |
| [Service Workers / Workbox](https://developers.google.com/web/tools/workbox) | Precaching and caching | ^7.4.1 |
| [Jest](https://jestjs.io/) | Unit testing | ^30.4.2 |
| [Cypress](https://cypress.io/) | End-to-end (E2E) testing | ^15.10.0 |
| [ESLint](https://eslint.org/) | Code linting | ^10.0.0 |
| [Prettier](https://prettier.io/) | Code formatting | ^3.8.1 |
Expand Down
Loading
Loading