Skip to content

The aim of this project is to publish and archive newsletters to a target email address.

License

Notifications You must be signed in to change notification settings

codingpot/newsletter_awesome_articles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ci send_newsletter

Publish Newsletter Curated by a Group of People

Even though the name says Group of People, it can be just you. The aim of this project is to publish and archive newsletters to a target email address.

  1. Write a content to be included in newsletter in YAML format under current directory.
    • Examples can be found in test directory.
  2. Create a PR for the write-up and merge it.
  3. If merged PRs exceeds the number of N, a newsletter contains those contents will be published.
  4. Published newsletters will be archived under archive directory by assigning the issue number.
  5. Also they will be archived by assigned tags (Markdown for each tag will be created, then each markdown contains a list of links to the original YAML file)

Prerequisite

You need to create GitHub Secrets named EMAIL and EMAIL_PASSWORD with appropriate values. Those values will be used in .github/workflows/newsletter.yml GitHub Action file to send out emails.

How to publish?

It basically collects every yaml files under /current directory. The name of yaml file should be formatted as YYYY-MM-DD Title so the files can be ordered correctly by themselves. The CLI below shows how to publish a newsletter manually.

# under src/ directory
$ go run main.go publish current

If you want to publish a newsletter based on GitHub Action, you need to configure .github/workflows/newsletter.yml. By default, it publish a newsletter when there are four yaml files in current directory. However, you can change the number of yaml files to trigger the publishing behaviour. Just change every line(below) of newsletter.yml as you like.

steps.number_check.outputs.number == HOW_MANY_YAML_FILES

YAML format

date: YYYY-MM-DD hh:mm
author: author name
title: title
thumbnail: image URL
link: link URL to the original
summary: preferably up to 2-3 sentences
opinion: preferably up to 5-8 sentences
tags: ["tag1", "tag2"]

Newsletter layout

The referenced newsletter layout is below that I have used for other purposes.

Todo

  • Parsing YAML
  • Filling Template
  • Sending Email
  • Move Current YAMLs to Archive
  • Write CI/CD script (GitHub Action)

About

The aim of this project is to publish and archive newsletters to a target email address.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages