Data Blog Platform Built with Gatsby and Python Automation

github repo

A data-focused blog platform built with Gatsby, designed to integrate Markdown and HTML content for publishing detailed data analyses and research posts.


Features

  • Static site generation using Gatsby with React
  • Support for Markdown and HTML content
  • Syntax highlighting for code blocks
  • Integration with various Gatsby plugins for image optimization, offline support, and smooth scrolling
  • Custom GraphQL queries to generate pages from content
  • Python build automation script for dependency management and site building

Tech Stack

  • Gatsby (React-based static site generator)
  • React 17
  • GraphQL for data querying
  • Python for build automation
  • GeoPandas, Folium, and other Python libraries for geospatial data analysis (in blog content)
  • PrismJS for syntax highlighting

Getting Started

Prerequisites

  • Node.js (v14 or higher recommended)
  • npm or yarn
  • Python 3 (for build automation script)

Installation

Clone the repository:

git clone https://github.com/justin-napolitano/data-blog.git
cd data-blog

Install dependencies:

npm install
# or
# yarn install

Running the Development Server

npm run develop
# or
# yarn develop

Open your browser at http://localhost:8000 to view the site.

Building the Site

npm run build
# or
# yarn build

Serve the production build locally:

npm run serve
# or
# yarn serve

Python Build Script

A Python script (python-build.py) automates cleaning, building, committing, and pushing the Gatsby site.

Run the script:

python python-build.py

Project Structure

/data-blog
├── content/                 # Markdown and HTML blog content organized by topic
├── src/                     # React components and templates
├── static/                  # Static assets
├── user-components/         # Custom user components
├── gatsby-browser.js        # Browser APIs and CSS imports
├── gatsby-config.js         # Gatsby configuration and plugins
├── gatsby-node.js           # Node APIs for page creation and schema customization
├── html_node.js             # Custom node creation for HTML content
├── python-build.py          # Python automation script for build and deployment
├── package.json             # Node.js dependencies and scripts
├── package-lock.json        # Exact dependency versions
├── README.md                # This file
└── LICENSE                  # License file

Future Work / Roadmap

  • Add comprehensive documentation and metadata for blog posts
  • Implement testing for React components and GraphQL queries
  • Enhance Python build script with error handling and logging
  • Add support for additional data visualization components
  • Integrate continuous deployment pipeline
  • Expand content types and support for interactive notebooks

Note: This README assumes the repository is a personal data blog leveraging Gatsby and Markdown content, with Python automation for build tasks.

hjkl / arrows · / search · :family · :tag · :datefrom · :dateto · ~/entries/slug · Ctrl+N/Ctrl+P for suggestions · Ctrl+C/Ctrl+G to cancel
entries 201/201 · entry -/-
:readyentries 201/201 · entry -/-