Picard
A prototype theme that uses React and WP-API
Install / Use
/learn @Automattic/PicardREADME
Picard
Picard is an experimental prototype WordPress theme that makes use of React and the new WP-API. It means, that instead of loading new page every time you click a link, it uses background AJAX requests to WP REST API to fetch data without reloading the page.
Please note, it is STRONGLY recommended that this theme is not used in any production environment. It is purely for educational and testing purposes. This theme is under development so it is not recommended that you rely on any aspect of it.
Installation
1. Working WordPress installation
First, prepare a proper WordPress environment:
- You will obviously need a working WordPress installation,
- You will also need WP REST API. It is a plugin (with plans to incorporate into the WordPress core) that creates REST API to be used by the theme. Plugin is currently NOT in plugins repository, you have to upload the files manually. Install and activate the WP REST API plugin (make sure that you are using the
masterbranch – the default is currently develop), - Set your permlink structure to
/%year%/%monthnum%/%day%/%postname%/.
2. Theme building (for team building go to your local meetup)
Unlike other themes, this one uses a build process. JavaScript is an interpreted language, but we need to take certain steps (like transpiling React JSX syntax or SASS CSS syntax) to take the files from development phase to production. You will need the following tools:
- node.js and npm - node is an command line JavaScript interpreter that is used for build process. npm stands for node package manager. You can install both from nodejs.org,
- gulp is a build system running on node. Once you install node and npm, type
npm install -g gulpto install gulp in your system (-gflag installs package globally so you will now have gulp command in your command line).
Next, you have to set up the theme:
- Download the theme files to
wp-content/themesdirectory of your WordPress installation. You can clone this repository (git clone git@github.com:Automattic/Picard.git) or just press download on the right side - also here (remember to unzip). - In Picard directory, run
npm installto install the node dependencies. npm will take care of the rest (npm installs dependencies listed in the package.json file). - In Picard directory, run
gulp buildto compile the JavaScript and SASS. Gulp will know what to do, because proper actions are listed in the gulpfile.js, - In Picard directory, run
gulp watchto actively develop the theme and have the styles and JS files automatically update. Watch command listens for file changes and starts build process every time you save a source file.
Contributing
Pull requests and issues are very much welcome!
Todos
A not exhaustive list of all things Picard still needs to do:
- Work with different permalink structures.
- Allow user to set a static front page.
- Allow user to use sidebars and widgets.
- Support all permalinks (archives, search etc)
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
