Skip to content

Theesamkos/News-Aggregator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

News Aggregator App

A modern, responsive news aggregator web application that fetches and displays news articles from various categories and allows users to search for specific topics.

Features

  • 📰 Browse news by categories (Business, Politics, Sports, Science, Health, Entertainment, Technology, General)
  • 🔍 Search for news articles by keywords
  • 📱 Responsive design that works on desktop and mobile
  • ♾️ Infinite scroll for seamless browsing
  • 🎨 Modern UI with hover effects and smooth transitions
  • 🔗 Direct links to full articles
  • 📅 Display publication dates and news sources

Technologies Used

  • HTML5 - Structure and semantic markup
  • CSS3 - Styling with modern features (flexbox, transitions, hover effects)
  • Vanilla JavaScript - Dynamic functionality and API integration
  • NewsAPI - Real-time news data source
  • GitHub Pages - Free hosting and deployment

Getting Started

Prerequisites

  • A modern web browser
  • NewsAPI key (get one free at NewsAPI.org)

Installation

  1. Clone the repository:
git clone https://github.com/Theesamkos/News-Aggregator.git
cd News-Aggregator
  1. Open script.js and replace the API key with your own:
const API_KEY = "your-newsapi-key-here";
  1. Open index.html in your web browser or serve it using a local server.

Local Development

For local development, you can use any simple HTTP server:

# Using Python 3
python -m http.server 8000

# Using Node.js (if you have http-server installed)
npx http-server

# Using PHP
php -S localhost:8000

Then visit http://localhost:8000 in your browser.

Usage

  1. Browse by Category: Select a news category from the dropdown and click "Fetch News"
  2. Search: Enter keywords in the search box and press Enter or click "Search"
  3. Infinite Scroll: Scroll down to automatically load more articles
  4. Read Full Articles: Click "Read More" on any article to view the full story

API Reference

This app uses the NewsAPI service:

  • Top Headlines: /v2/top-headlines - For category-based news
  • Everything: /v2/everything - For keyword searches

File Structure

news-website/
├── index.html          # Main HTML file
├── style.css           # CSS styles
├── script.js           # JavaScript functionality
└── README.md           # Project documentation

Contributing

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • NewsAPI for providing the news data
  • Google Fonts for the Roboto and Poppins fonts
  • Icons and inspiration from various design resources

Author

Theesamkos - GitHub Profile


⭐ Star this repository if you found it helpful!

About

Research any news using key words or by category

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors