Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
HTML/Sass starter site that fetches DEV posts via a Netlify function, with node-sass, Browsersync, and minified autoprefixed builds.
DEV API + Netlify Functions Starter Site is a minimal HTML/Sass boilerplate that retrieves your published DEV.to articles through a Netlify Function and renders them as a styled post list on a static site. It ships with node-sass for styling, Browsersync for hot reloading, and a production build that minifies and autoprefixes CSS.
The DEV API + Netlify Functions Starter Site is a skeleton project that combines a plain HTML/Sass front end with a Netlify function to pull your published DEV posts from the DEV API. Inputs are a DEV API key and a Netlify account; outputs are a deployable static site and a JSON endpoint at [yoursite.com]/.netlify/functions/devto that returns your latest posts. The template includes a netlify.toml that preloads Netlify build settings, and the repository metadata lists six stars.
functions/devto.js fetches published articles and exposes them at /.netlify/functions/devto; the per_page value can be set up to 1000.npm run build produces minified, autoprefixed CSS.npm run develop starts a local server at localhost:1337 with live reload for rapid iteration.netlify.toml fills in build settings, and you only need to add the DEVTO environment variable containing your DEV API key.createPostList function in js/posts.js controls the list markup, and the API field map inside functions/devto.js determines which values appear.js/postdata.json to develop and style offline without hitting the API on every change..posts element and the js/posts.js script will display the post list.This starter is aimed at DEV.to authors who want an auto-updating index of their articles on a custom domain without maintaining the HTML by hand. It also suits developers learning Netlify Functions who want a compact, working example of a serverless function consuming an external API. Static-site hobbyists who prefer a dependency-light HTML/Sass setup over a full framework will find the plain structure approachable.
per_page./.netlify/functions/devto endpoint to feed your post data into other applications or dashboards.netlify.toml.DEVTO with your API key as its value./.netlify/functions/devto and the site builds successfully.Yes. The template requires a DEV profile with at least one published post and a DEV API key to authenticate requests to the DEV API.
Edit the per_page value inside the $apiRoot variable in functions/devto.js. The DEV API permits values up to 1000.
Yes. Use npm run develop to serve with hot reload at localhost:1337, or npm run build followed by npm run serve to serve the latest production files.
DEVTO environment variable for?It holds your DEV API key and is used by the Netlify Function to authenticate when fetching your published posts.
