https://github.com/getshifter/example-ionic-react-wordpress
https://github.com/getshifter/example-ionic-react-wordpress
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/getshifter/example-ionic-react-wordpress
- Owner: getshifter
- Created: 2020-04-22T13:43:15.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-19T18:55:14.000Z (over 1 year ago)
- Last Synced: 2024-11-19T19:53:38.728Z (over 1 year ago)
- Language: TypeScript
- Size: 2.2 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ionic React with WordPress example
## Just try the demo site
You can deploy the demo site to the following services.
[](https://console.aws.amazon.com/amplify/home#/deploy?repo=https://github.com/getshifter/ionic-react-wordpress)
[](https://app.netlify.com/start/deploy?repository=https://github.com/getshifter/ionic-react-wordpress)
## Getting started
```bash
$ git clone git@github.com:getshifter/ionic-react-wordpress.git
$ cd ionic-react-wordpress
$ npm install
$ npm start
```
## Use own WordPress
General configuration file is `src/config.ts`.
You can update properties for your WordPress site.
```typescript
class Config {
get postURLPrefix() {
return 'news'
}
get pageURLPrefix() {
return ''
}
get wordpressURL() {
return'https://central.wordcamp.org/wp-json'
}
get wpClient() {
return new wp({
endpoint: this.wordpressURL
})
}
}
```
## Production build
```bash
$ npm run build
```
## Desktop application
We can run it as a Desktop application
```bash
$ yarn run build && npx cap copy
$ npx cap open electron
```
### Build for Desktop
```bash
$ yarn run build && npx cap copy
$ cd electron
$ npx electron-packager . sample --platform=darwin --arch=x64
$ open ./sample-darwin-x64
```