Post Reader is a Github project/repository that can be forked to deploy and host a website that aggregates user submitted hyperlinks ("posts"), for your specific topic, to Github Pages. Anyone with a GitHub account that creates a Pull Request can contribute content to the website.
It also includes an integration into an AI-driven content summariser for those instances where contributors omit certain meta content or summaries.
The source repository (this one), includes a few example posts related to Angular, the framework this repository was built with. These examples can be viewed at this repository's Github Page.
Before submitting your first post, scroll down to the Before making your first contribution section.
- Go to the Post Template Page
- Copy the template using the Copy raw file button located in the File Preview toolbar
- Click the
+
(Add file) button in the Files sidebar on the left - Paste the template content
- Optionally, insert a
Title
tag. (A title will automatically be extracted from the original content if omitted) - Insert one or more
Tags
tags, to ensure your content is categorised accordingly - Most importantly, insert the hyperlink into the
Link
tag using the format in the example. - Optionally, insert an
Image
tag. This will be used as a thumbnail on the website post feed. (An image will automatically be extracted for use as a thumbnail, from the original content if omitted) - Below the meta section (starting and ending with
---
) you are able to add a summary for your post using Markdown syntax. (A summary will automatically be extracted from the original content if omitted)
---
[//]:# (Title: My title)
[//]:# (Tags: #my, #tags)
[//]:# (Link: https://my-example.com)
[//]:# (Image: https://www.btselem.org/sites/default/files/styles/huge/public/2024-08/wth-cover-en_0.png)
---
# My Example header
My example summary goes here. Lorem Ipsum dolor sit amet ...
Example template
Please note: certain websites prevents web scrapers from reading their content. In such situations metadata defined above might not be extractable. Websites known to prevent web scraping are listed in the Websites known to prevent Web Scraping section.
- Use the Commit button to progress to the next step
- If prompted, optionally add a commit message
- From the two options presented, to commit directly or to create a Pull Request, select the Pull Request option
- Finally confirm your commit to submit your post
- A member of the approval committee will now receive your submission and approve it for display on the website
Create a Github Account if you don't have one yet and return to this page. This step does not have to be repeated after creating your account.
By default, for any commits made to the main
branch of your new repository, a deployment to Github Pages will triggered using Github Workflows.
Configure your Custom Domain to allow your website to display on your pre-registered domain of choice.
To disable Github Pages deployments, delete the file .github/workflows/npm-publish-github-packages.yml
A sample set of terraform scripts can be found at the /terraform
location. The sample terraform scripts are configured to deploy to AWS. Update and use as per your cloud provider and CI/CD framework accordingly.
See Other section below as well.
When setting up your own build and continuous integration pipelines, please note this application uses a custom npm command. Use npm run build-with-content
to build your application.
- Go to rapidapi.com and create an account
- Go to the TLDRThis API and subscribe to it
- Copy your X-RapidAPI-key
- Copy the URL found in the Code snippets section (with the trailing slash)
- Fork the project to a new public repository
- Go to the forked repo's Settings page
- Go to Secrets and Variables >> Actions
- To the repository secrets add the
SUMMARISEAPI
secret - Also add the
SUMMARISEAPIKEY
you copied at step (3) - Go to Actions >> General and enable Github Actions
- Go to Pages and for the Build and deployment >> Source setting, select Github Actions
- Ensure necessary Pull Request and Commit permissions are set up to allow for post approvals by the administrator and/or moderators
- Change the title at the top of this markdown file (
# Post Reader
) - Change the two intro paragraphs at the top of this markdown file, to reflect the topic and purpose of your own website.
- In the file located at
src/app/app.config.ts
change the site title on line 24 - Remove the example posts in the
src/content
folder - See Base Path Management below
- Submit and commit your first post
Due to this repository defaulting to Github Pages, there is a deployment step in the NPM tasks in the package.json file to include a base path in the build step. Depending on your hosting selection you will have to make one of the following changes
Go to the package.json file, line 13, and replace /post-reader/
with the base path associated with your Github Pages page
Depending on your hosting/website configuration, go to the package.json file and update line 13 as required. Likely you have to remove the --base-href
argument
- Better Youtube scraping
- Process relative image url's correctly
- Launch page on AI toggle
- Persist toggle preference
- Display multiple columns on larger screen sizes