Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blynkkk/news
https://github.com/blynkkk/news
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/blynkkk/news
- Owner: blynkkk
- Created: 2022-03-08T15:57:57.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-27T17:45:02.000Z (3 months ago)
- Last Synced: 2024-11-27T18:35:22.271Z (3 months ago)
- Size: 354 KB
- Stars: 1
- Watchers: 4
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
You can update your customers with latest news. When new content is available, it will be automatically shown in a popup. Users can close the popup and return read the news later.

# Initial Setup
1. Create a new **public** GitHub repository
2. In Your.Console go to Settings -> Application Settings -> News repository -> add a link to your Github news repository
# Working with content
Your repository should have this structure:### config.json
This file stores a list of all news in JSON format. You need to follow the exact structure as described below:```
"list": [ // list of news
{
"path": "/list/second.md", // path to md file. (required)
"date": "04.09.2022", // date and time of the post (required) FORMAT: MM.DD.YYYY (required)
"link": "Read more" // Link is optional - for the latest post it will render as a button, for older news it will be rendered as a regular link.
"URL": "https://mywebsite.com/news.html" // Link URL. Links will open in new browser tab.
}
]
```### news folder
This folder contains individual news files in .md ([markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax))format.
# Making first post:
1. Inside of the `news` folder create new file: `my_first_news.md`. File name can be any.
2. Edit the contents of the file
- Title (required). Keep it short
- You can add a cover image (optional) in .png format. Size: 640x120px
- Plain text. This is the actual content of the newsExample:
```
# Title
If you believed they put a man on the moon
Man on the moon
If you believed there's nothing up his sleeve
Then nothing is cool
```3. Edit `config.json` by adding details about the new post.
Example:
```
{
"news": [
{
"path": "/news/my_first_news.md",
"date": "04.09.2022",
"link": "Read more"
"URL": "https://mywebsite.com/my_first_news.html"
}
```
4. Go back to Console and refresh page (F5)# Making next posts:
1. Inside of the `news` folder create new file: `my_second_news.md`. File name can be any
2. Edit the contents of the file as described above
3. Update `config.json` by adding info about new post to the top of the fileExample:
```
{
"news": [
{
"path": "/news/second.md",
"date": "04.09.2022",
"link": "Read more"
"URL": "https://mywebsite.com/my_second_news.html"
},
{
"path": "/news/my_second_news.md",
"date": "07.11.2022",
"link": "Read more"
"URL": "https://mywebsite.com/my_first_news.html"
}
]
}
```### 🚨🚨🚨 IMPORTANT - news files should only contain content. Date, and URL for button should be placed in config.json