this-week-in-neovim.org official webapp repository

Overview

This Week In Neovim

This repository holds the source code of https://this-week-in-neovim.org.

Architecture

The website is composed of two main pieces:

  • back, the backend binary. It has different roles:
    • As a web server, it responds to requests, such as /, /latest, weekly news, RSS feeds, etc. and serves the right content. Served content is cached with a TTL (currently 1 day but that might change).
    • It runs in a dedicated thread a notify file watcher, connected to a directory which contents is the contents repository. If a new weekly is added, it automatically loads it.
  • twin, the Rust library for representing weekly news, parsing, converting Markdown to HTMl, etc. etc.

How does it run in production

  1. The backend is compiled with cargo build --release and pushed to a remote production server.
  2. On that server, a clone of this repository runs git fetch and git rebase origin/master (that repository always stays on master).
  3. Then, a docker image is built by running docker build .. See the [Dockerfile][./Dockerfile]. That process copies the binary into the image as long as the server configuration, static files. A directory is created to be able to read from the contents repository.
  4. Once the image is built, docker tag is run twice: once to create the twin:M.N.P SemVer image, and another time to create twin:latest.
  5. A docker-compose project is restarted with twin:latest and the webapp runs.

Automatic updates every Monday

On every Monday, a git script is run by a systemd unit, according to a timer. That script simply git pull --rebase in the right host directory (which is mounted in the docker container). For short: thanks to the notify thread and mounting the volume in the docker container, there is no service interruption to do to release a new weekly: the only thing is to merge to master on the contents repository before every Morning CET. The refresh date time is currently set on Monday 9:00 AM CET.

Licences

The source code of the website itself (i.e. this very repository) is licensed with the BSD-3 New Clause.

However, the actual content this is published (the “weekly news”) is licensed with CC-BY-SA-4.0. The license can be found here.

Comments
  • Contributing

    Contributing

    Hi @phaazon ! Very good idea :) I'm pretty good with writing rust code, if you need help, i'd be happy to contribute. But it would be great to have a small contributing.md that shows the direction this will take so people can contribute to features that are needed. Let me know if you need help !

    opened by kyazdani42 3
  • Fix: use valid RFC 822 date-time format in RSS feed

    Fix: use valid RFC 822 date-time format in RSS feed

    This ensures that the RSS feed conforms to the RSS 2.0 specification. Tested with the contents from https://github.com/phaazon/this-week-in-neovim-contents. The feed is now valid according to the W3C feed validator (https://validator.w3.org/feed/):

    valid-feed

    Edit: this fixes https://github.com/phaazon/this-week-in-neovim.org/issues/12

    opened by LeonGr 2
  • feat: use ISO format for rss pub date

    feat: use ISO format for rss pub date

    As the title says. I was able to build the project, but not to run it (I think because the articles are missing). I don't do rust, so please try out this code for me and tell me if it works.

    Either way, this patch allows RSS readers to parse the pub date properly.

    opened by GabMus 2
  • Invalid RSS

    Invalid RSS

    The current rss-feed located at https://this-week-in-neovim.org/rss is not entirely valid RSS. I noticed that because my fead-reader of choice did not parse the publication date correctly. I have run Feed Validator over the feed and got:

    line 1, column 201: lastBuildDate must be an RFC-822 date-time line 115, column 0: description should not contain controls attribute (29 occurrences) line 313, column 3: description should not contain relative URL references (218 occurrences) line 313, column 94: Email address is not in the recommended format (11 occurrences) line 313, column 127: pubDate must be an RFC-822 date-time (11 occurrences) line 313, column 137: item should contain a guid element (11 occurrences) line 934, column 0: description should not contain iframe tag (5 occurrences) line 3331, column 0: Non-html tag (4 occurrences) line 3815, column 144: Missing atom:link with rel="self"

    Most notably in my case is the use of an invalid date-time format (e.g. you used "26 Sep 2022 GMT" and the specification says e.g. "Sat, 07 Sep 2002 00:00:01 GMT").

    opened by Schmiddiii 2
  • Add back to home link on /all

    Add back to home link on /all

    Great job making TWIN!

    I was looking at the website and was struggling for a second going back to the home page after navigating to /all (before clicking the header).

    I thought it might be more intuitive to have a link mirroring More updates -> to get back to the home page so I added a <- Back to home link on /all.

    Perhaps it won't make sense here with pagination?

    image

    opened by codicocodes 1
  • Cache invalidation

    Cache invalidation

    Notify events are well received but since we cache pretty much everything (RSS feeds, HTML pages, etc.), we need to explicitly invalidate the cache when we receive a notify event.

    opened by phaazon 1
  • Provide full text in RSS feed

    Provide full text in RSS feed

    Fixes #2.

    After writing my explanation on Reddit, I was bored and implemented it myself. Unfortunately, I couldn't test it as I can't get the frontend to run locally, but at least it builds 🤷‍♂️

    opened by d12bb 0
  • Provide the full article

    Provide the full article

    I assume you’re not going to run advertisements and tracking on the website, therefore there should be no need to only provide an abstract, or as it is currently, just a link to the article in the feed. I would recommend to let readers have the choice to consume the content in their own feed reader.

    opened by luetage 0
Owner
Dimitri Sabadie
Do not make more tools than existing problems.
Dimitri Sabadie
The official command-line interface for the makedeb Package Repository

mpr-cli This is the repository for the MPR CLI, the official command-line interface for the makedeb Package Repository. Installation Users have a few

makedeb 38 Jan 2, 2023
🔭 Search Dash.app from Neovim with Telescope. Built with Rust 🦀 and Lua

Dash.nvim Query Dash.app within Neovim with a Telescope picker! The theme used in the recording is lighthaus.nvim. Note: Dash is a Mac-only app, so yo

Mat Jones 193 Dec 28, 2022
Neovide - No Nonsense Neovim Client in Rust

Neovide This is a simple graphical user interface for Neovim (an aggressively refactored and updated Vim editor). Where possible there are some graphi

Neovide 9.3k Jan 5, 2023
An async autocompletion framework for Neovim

⚡ nvim-compleet This plugin is still in early development. ?? Table of Contents Installation Features Configuration Sources Commands Mappings Colors R

Riccardo Mazzarini 520 Dec 25, 2022
Xcode Neovim Replacement-ish.

An XCode replacement-ish development environment that aims to be your reliable XCode alternative to develop exciting new [apple] software products ??

null 272 Dec 30, 2022
Failed experiment in downloading random cat image, turning it into ascii and displaying it in Neovim.

cat.nvim Failed experiment in downloading random cat image, turning it into ascii and displaying it in Neovim. Failed as I realized far too late, that

James Vero 4 Aug 5, 2022
Neovim Configuration Manager (Swap/Backup/Try Configurations Easily)

ncm-rs Neovim Configuration Manager (Swap/Backup/Try Configurations Easily) I created this package because I wanted to try out Lazyvim (which is why i

instance.id 4 Mar 5, 2023
Neovim plugin for moving lines up and down, written in Rust

Moveline.nvim Moveline is a simple plugin for moving lines up and down. It's written in Rust using my library nvim-utils. Installation Moveline can be

Will Hopkins 34 Mar 18, 2023
WIP. Goals: Treesitter highlighting, snippets, and a smooth intergration with neovim.

typst.nvim WIP. Goals: Tree-sitter highlighting, snippets, and a smooth integration with neovim. For the past week, I've been thinking what I want for

SeniorMars 66 Apr 9, 2023
A dark and light Neovim theme written in fennel, inspired by IBM Carbon.

oxocarbon.nvim Note: The old rust version can be found on the rust branch of this repository Oxocarbon is looking for ports! If you're a user of anoth

Nyoom Engineering 690 Jun 29, 2023
nvim-oxi provides safe and idiomatic Rust bindings to the rich API exposed by the Neovim text editor.

?? nvim-oxi nvim-oxi provides safe and idiomatic Rust bindings to the rich API exposed by the Neovim text editor. The project is mostly intended for p

Riccardo Mazzarini 655 Jul 13, 2023
A CLI to easily switch between multiple Neovim configuration environments, written in Rust

Neovim Configuration Switcher Neovim Configuration Switcher (short nvims) is a CLI to easily switch between multiple Neovim configuration environments

Nhan Pham 3 Mar 30, 2024
🚀 Discord Rich Presence plugin for Neovim written in Rust

?? Cord ?? Cord is a Discord Rich Presence plugin designed for Neovim, written in Rust. ?? Features Lightweight and dependency-free Cross-platform sup

vyfor 39 May 6, 2024
Mirror of https://gitlab.redox-os.org/redox-os/termion

Documentation Examples Changelog Tutorial Termion is a pure Rust, bindless library for low-level handling, manipulating and reading information about

Redox OS 1.9k Dec 31, 2022
A simple cli to clone projects and fetch all projects in a GitHub org..

stupid-git A simple cli to clone projects and update all projects. get all repository from GitHub clone all pull all with git stash Usage create sgit.

Fengda Huang 5 Sep 15, 2022
A tool to format codeblocks inside markdown and org documents.

cbfmt (codeblock format) A tool to format codeblocks inside markdown, org, and restructuredtext documents. It iterates over all codeblocks, and format

Lukas Reineke 126 May 26, 2023
Simple joke randomizer from bash.org.pl made as CLI Tool in Rust.

RBashOrg Simple joke randomizer from bash.org.pl made as CLI Tool in Rust. Description Main motivation of this project was to learn basic concepts abo

Krzysztof Szostak 3 Feb 20, 2024
Yfin is the Official package manager for the Y-flat programming language

Yfin is the Official package manager for the Y-flat programming language. Yfin allows the user to install, upgrade, and uninstall packages. It also allows a user to initialize a package with the Y-flat package structure and files automatically generated. In future, Yfin will also allow users to publish packages.

Jake Roggenbuck 0 Mar 3, 2022
This tool will profile official instances of OpenSUSE mirrorcache to determine the fastest repositories for your system

Mirror Magic tool to Magically make OpenSUSE Mirrors Magic-er This tool will profile official instances of OpenSUSE mirrorcache to determine the faste

Firstyear 30 Dec 22, 2022