This feature is available on the Business (Advanced) and Extra plans. We recommend exporting projects with the help of a professional web developer.
You can export the source code of your project and host it on external servers. Publish your project, enter Preview Mode and click on the share icon located at the bottom left of the screen. Next, open the 'Export’ tab and select ‘HTML’.
The process involves three steps:
- download the source code;
- upload it to a remote server;
- configure the server.
Please note that projects will not work without the third step.
Known limitations:
- If you use Stripe as your e-commerce vendor, it won't work in the exported projects. Ecwid works without any limitations.
- Readymag Form widget can only send data to a custom URL. Google Docs, e-mail, and MailChimp options will not work in exported projects.
- Custom Open Graph tags and SEO tags are not exported for any page except the first one (meta tags stored in index.html).
- Exported projects cannot be changed. The content is encoded in JSON format and rendered on a page via JavaScript. To make changes, find the project in your account, make any edits, re-publish, and export again.
Step 1: Download the source code
To get your project’s source code you’ll need to publish it first. Next, specify the full URL path where the project will be hosted in the dialogue box (e.g., domain.com/project/about) and click ‘Create export’. Once ready, it will be delivered to the inbox of the email address associated with your Readymag account.
Step 2: Upload the archive to a remote server
In the downloaded archive you’ll find the following files and folders:
File | Description |
robots.txt | pre-defined settings for web crawlers |
build | stylesheets, templates, and scripts |
img | all images used in the project |
snippets | static contents of all pages for search crawlers |
index.html | project page, contains the content of the project encoded in JSON |
sitemap.xml | list of available links for search crawlers |
sorry.html | custom page for unsupported browsers |
nginx_rmwebsite.conf | sample configuration file for NGINX servers |
.htaccess | sample configuration file for Apache servers |
Step 3: Configure your server
If you don’t have access to the settings of your NGINX or APACHE servers, please contact your hosting provider and ask them to configure your servers according to the samples below.
NGINX
server {
listen 80;
server_name nightcities.readymag.com;
# Change path to folder with downloaded source
root "/path/to/project_folder";
index index.html;
access_log off;
autoindex off;
charset utf-8;
location / {
if (-f $request_filename ) { break; }
if ($args ~ "_escaped_fragment_") {
rewrite ^/([.a-zA-Z0-9-]+)/? /snippets/$1.html last;
rewrite ^/ /snippets/1.html last;
}
location = / {
if ($args ~ "_escaped_fragment_") {
rewrite ^/ /snippets/1.html last;
}
}
rewrite ^/?$ /index.html last;
rewrite ^/[.a-zA-Z0-9-]+(/(.*))? /$2 last;
try_files $uri $uri/;
}
}
Apache
Options FollowSymLinks SymLinksIfOwnerMatch AddDefaultCharset utf-8 AddType application/vnd.ms-fontobject eot AddType font/opentype otf AddType font/truetype ttf AddType application/font-woff woff AddType video/webm webm RewriteEngine On RewriteBase / RewriteCond %{QUERY_STRING} _escaped_fragment_ RewriteCond %{REQUEST_URI} !^/(build|img|snippets|config) RewriteRule ^([.a-zA-Z0-9-]+) snippets/$1.html [L] RewriteCond %{QUERY_STRING} _escaped_fragment_ RewriteCond %{REQUEST_URI} !^/(build|img|snippets|config) RewriteRule ^ snippets/1.html [L] RewriteCond %{REQUEST_URI} !^/(build|img|snippets|config) RewriteRule ^/?$ index.html [QSA,L] RewriteCond %{REQUEST_URI} !^/(build|img|snippets|config) RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^[.a-zA-Z0-9-]+(/(.*))? $2 [QSA,N]
If you host your website on an Apache server, chances are the .htaccess configuration will take effect automatically. Make sure you uploaded the .htaccess from the exported archive to your web server: on MacOS, .htaccess is hidden. If the .htaccess configuration does not work (typical symptom: pages other than first return 404 on refresh), ask your hosting provider to enable .htaccess.
If you host your website on your own NGINX server, you can either copy and paste nginx_rmwebsite.conf contents into your main nginx.conf or include nginx_rmwebsite.conf into nginx.conf with an “include” directive. If the NGINX you host on is not your own, ask your hosting provider to apply the configuration from nginx_rmwebsite.conf for you.
If you don’t have access to your NGINX or Apache server, contact your hosting provider to configure the files according to the examples provided above. Without configuring the server properly, the project won’t work, even if you’ve uploaded all of the required files.
How it works
Below is an explanation of how routing works in Readymag projects. All paths in the code are relative—your server needs to be configured to serve them.