To generate the static site, first ensure you have the Rust toolchain and a local http-server installed.
- Execute
cargo runto generate the HTML in the/sitedirectory. - Copy the contents of the
/resourcesdirectory to the generated/sitedirectory using the commandcp resources/* site. - Serve the static files in the
/sitedirectory using an http-server likenpx http-server site.
The news sources can be configured in the news_config.yml file.
To add a new news source, find the RSS/Atom link for the feed and add a new item to the sources list:
sources:
- title: Example
link: https://www.example.com/link-to-rss.xml
category: Tech
s_type: RSS # or Atomexport PROFILE_NAME="your-profile-name"
export ECR_ALIAS="your-ecr-alias"
# build image
docker build --platform linux/amd64 -t news-curator .
# log into Docker using ECR creds
aws \
--profile $PROFILE_NAME \
ecr-public \
get-login-password \
--region us-east-1 \
| \
docker login \
--username AWS \
--password-stdin public.ecr.aws/$ECR_ALIAS
# tag image with ECR uri
docker tag news-curator:latest public.ecr.aws/$ECR_ALIAS/news-curator:latest
# push image to ECR
docker push public.ecr.aws/$ECR_ALIAS/news-curator:latest