Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/darekkay/tip-of-the-day

Get your daily knowledge dose
https://github.com/darekkay/tip-of-the-day

daily feeds rss rss-feed

Last synced: 17 days ago
JSON representation

Get your daily knowledge dose

Awesome Lists containing this project

README

        

# Tip of the Day

[![Build](https://img.shields.io/github/actions/workflow/status/darekkay/tip-of-the-day/ci.yml?branch=master&style=flat-square)](https://github.com/darekkay/tip-of-the-day/actions/workflows/ci.yml)
[![license](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](https://github.com/darekkay/tip-of-the-day/blob/master/LICENSE)

Get your daily knowledge dose.

For each category, a single tip is delivered every day. Subscribe via an HTML bookmark, RSS feed or JSON endpoint.

Live at [tips.darekkay.com](https://tips.darekkay.com).

## Contribute

Only include data if no copyright is validated.

### Setup

Notice: You may use `npm` instead of `yarn`.

1. Install all dependencies:

```bash
yarn install
```

2. Build:

```bash
yarn build
```

To generate all feeds, run `yarn build:feeds` daily in a cron job.

The `package.json` file contains other useful scripts, which you can execute using `yarn ` or `npm run `:

| Command | Description |
| -------- | ----------------------------------------------------- |
| build | Builds the site for production to the `build` folder. |
| format | Reformat all files with `prettier`. |
| lint:fix | Run ESLint, apply automatic fixes if possible. |
| test | Run tests. |

The `master` branch is (manually) deployed to [tips.darekkay.com](https://tips.darekkay.com).

### Add more data sources

All data used to generate daily tips is stored within the repository.

1. Run `npm run generate` to generate a new data source boilerplate.
2. Include your data source in `src/data-sources//data.json`. Using a `scraper` is recommended to keep the data up-to-date.
3. Define how the data should be rendered in `src/data-sources//template.js`.
4. Add the new data source to the `data-sources/index.json` file.

### Templating

The `template.js` file does not enforce the way to write data source templates. It is possible to use simple JavaScript template strings, but EJS template files are highly recommended for a better readability (`template.ejs`).

## License

This project and its contents are open source under the [MIT license](LICENSE). The license of the individual data sources is specified in the according `data.json` files.