A Single-Page-Application theme for WordPress.
This theme is inspired by themes of the following blogs.
Thanks to them and their wonderful theme authors:
- React 16
- TypeScript
- Honoka
- Monaco Editor
- Typed.js
- i18next
- Install this WordPress plugin to enable comments via REST API and pass raw HTML content to front-end.
- Enable that plugin.
- Clone this repository, modify
src/config.js
in case you need. - Build the project,
npm install npm run build
- Configure your http server. Here's an example:
# Virtual Host configuration for example.com # # You can move that to a different file under sites-available/ and symlink that # to sites-enabled/ to enable it. server { listen 80; listen [::]:80; server_name blog.cool2645.com; rewrite ^(.*) https://blog.cool2645.com$1 permanent; } server { listen 443; listen [::]:443; server_name blog.cool2645.com; root /var/www/blog; index index.htm index.html index.php; ssl on; ssl_certificate /etc/letsencrypt/live/www.cool2645.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/www.cool2645.com/privkey.pem; ssl_trusted_certificate /etc/letsencrypt/live/www.cool2645.com/chain.pem; rewrite /wp-admin$ $scheme://$host$uri/ permanent; location / { root /var/www/blog/orange-cheers; try_files $uri $uri/ /index.html; } location ~ \.php$ { include snippets/fastcgi-php.conf; # With php7.2-fpm: fastcgi_pass unix:/run/php/php7.2-fpm.sock; } location ~ /feed|wp-.*/ { try_files $uri $uri/ =404; if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; } } }
- If you write markdown, place a pre tag for compatibility. Note that there shouldn't be any HTML tags in the markdown content. If you need HTML, close the pre tag first.
<pre lang="markdown" class="lang:markdown"> # markdown goes here </pre>
MIT License.
Cool you.