Skip to content

Allows sites to serve and track changes of root level XML, JSON, and other data files without directly uploading files to the server

Notifications You must be signed in to change notification settings

GSA/datafiles-wordpress-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Datafiles WordPress Plugin

Allows machine-readable files like JSON or XML file to be versioned inside WordPress as a custom post type, and be properly cached and served without directly uploading them to the server.

How it works

The plugin registers a custom post type "datafile" which functions nearly identically to normally WordPress posts, except in how they are served to users. When a datafile is viewed, the proper content-type header is served to the user's browser, and the file content is served raw (without any header or footer) ensuring it renders properly. This allows WordPress sites to curate and host machine-readable static files, creating light-weight pseudo-APIs.

History

Created as a proof-of-concept to show how a machine-readable files could be served by a CMS in conjunction with the President's Digital Strategy.

Note

This plugin allows users to serve unfiltered content to visitors. By default, only administrators have access to edit datafiles. Additional capabilities can be granted via third-party plugins such as the Members plugin.

License

About

Allows sites to serve and track changes of root level XML, JSON, and other data files without directly uploading files to the server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published