wp2static / wp2static Goto Github PK
View Code? Open in Web Editor NEWWordPress static site generator for security, performance and cost benefits
Home Page: https://wp2static.com
License: The Unlicense
WordPress static site generator for security, performance and cost benefits
Home Page: https://wp2static.com
License: The Unlicense
contact this repo owner, will need updating to new plugin structure
Issue activating plugin on PHP 5.3x (5.6 should be OK).
Look to detect capabilities and disable functionality (ie, Dropbox/Guzzle) in these cases..
Plugin could not be activated because it triggered a fatal error.
Parse error: syntax error, unexpected '[', expecting ')' in /var/www/wp-content/plugins/static-html-output-plugin/library/dropboxsdk/guzzlehttp/promises/src/functions.php on line 45
so as to not risk a bad export messing up your live site...
When exporting a site containing certain characters on a UTF-8 site, exported HTML pages contain mojibake. Exported site contents should match original.
Attached are sample before/after files with encoding issues
exported.htm.utf8.txt
wordpress.htm.utf8.txt
To test:
Encoding issue when no charset
meta defined as utf-8:
input
(#2 in URL Configurations)
output
(#2 in URL Configurations)Â
resolved by setting:
<meta charset="utf-8" />
From user-submitted email:
I forget the exact error I was dealing with, but here's the flow:
I am using TLS to protect my communication with the web server (wordpress).
I'd like to bring the web server behind the firewall so it is not exposed to attack.I had issues with TLS hostname mismatch and your plugin, where whatever was fetching the pages before sending them off to S3 couldn't deal with the fact my private site had an invalid cert.
When the web server is behind the firewall letsencrypt (free TLS certs) won't work, and why would I pay for one for a firewall protected site?
I can install the TLS certificate locally to trust it manually, and I can probably install it into the web server system trust chain too if I can figure out which SSL library applies, but then I still have to deal with TLS mismatch if I've got multiple sites and one cert with no SANs.
If it's easy to just ignore TLS warning that would be great. If not, maybe I'll switch my entire site back to http. I can workaround the TLS issue so don't change libraries for me, but if its as simple as a checkbox and a runtime switch to your "fetch" library -- well thats great.
Is it possible to export always into the same folder and not to export every time in new one?
ie, on shared hosting. Will timeout with large sites/slow servers. Change to polling client-server method
作者你好,我在翻译了插件过程中,发现有些地方不能翻译。翻译的文件发到了你的EMAIL([email protected]),有时间看看
ie, multiple rewrite and deployment options, to cover use case of demo site - wanting to publish to netlify, ftp, s3, etc. Each will have their own base url and possibly deployment methods.
can have unlimited* deployment scripts - options for their build triggers, if it's on each build or on demand. gives user more flexibility and this would cover use case of the other issue (#4) mentioning uat/production environment deployments...
for easier communication of errors by users / shorten feedback loop
most users may not bother to signup/login to WP.org to report issue or open email client
using Safari on an old iPad the buttons to ‘save current options’ and ‘start static site export’ act as input fields, and won’t work.
look at changing from input with class of button (taken from WP style guide?) to button with same class.
PHP Warning: require(/Users//S3StaticTest/wp-content/plugins/static-html-output-plugin/library/aws/Aws/S3/Enum/CannedAcl.php): failed to open stream: No such file or directory in /Users//S3StaticTest/wp-content/plugins/static-html-output-plugin/library/aws/aws-autoloader.php on line 1349
or
PHP Fatal error: require(): Failed opening required ‘/mycode/blog/wp-content/plugins/static-html-output-plugin/library/aws/Aws/S3/Enum/CannedAcl.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /mycode/blog/wp-content/plugins/static-html-output-plugin/library/aws/aws-autoloader.php on line 1349
Hey. Great Plugin! After the last update (to 1.6) i'm getting on every export just an empty index.html (0 kb). Tryed with different sites. Then I've tryed with the old version 1.2 and everything works just fine. Wordpress 4.7.3
files seeming to be missing:
<script type="text/javascript">
--
| window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/2.4\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/2.4\/svg\/","svgExt":".svg","source":{"concatemoji":"http:\/\/172.17.0.3\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.9.5"}};
so can be a manual copy - just hardcode inclusion of it (may throw warning on older clients)
style.min.css?ver=2.1.2
)ie, mysite/mywpinstall which exports to mysite/
From user Leif:
My ultimate use case would be to publish to BunnyCDN storage upon post update automatic .. If I could dream of a perfect scenario .. =)
I have authors that posts and they would need to see the new post direct when they hit publish .. =)
I uploaded a html site without any optimization to BunnyCDN storage and just connected the domain to it´s CDN solution with cname as an example, you can see the domain here https://www.copy24.se/elements.html nothing fancy, just some files I had on my harddrive .. So you could get a feel about BunnyCDN .. =)
If you would implement BunnyCDN Storage API they have 2 different API sites, one for the regular cdn api at https://bunnycdn.docs.apiary.io and the other for the storage api at https://bunnycdnstorage.docs.apiary.io
I can really recommend BunnyCDN because they are a really friendly new ( started in 2015; https://bunnycdn.com/about ) company from Slovenia and their performance is often faster then AWS Cloudfront for a minimum of just $10 a year and about 8 times cheaper than AWS Cloudfront on their CDN and $0.01 /GB per month for their ssd storage .. and if you have a small site and the total bill is under the minimum yearly $10 then it cost you only the minimum fee of $10 a year .. It´s so cheap .. and for static sites, you can host a lot of sites with your plugin and you do not have to worry about traffic surges if you get lucky on one article in traffic.
pseudo steps:
add option to view "only deploy changes since last export" is checked
if checked
at start of export, cp contents (not symlink) of latest-1
to former
dir
at end of post-processing stage, remove any files from outputdir, which are identical to those in the former
existing functionality for building deployment list from output dir should then work as usual, but have a lesser set of files to copy
This should usually skip all binaries and assets if only doing WP content updates.
write to archive_name_log.txt as crawling/FTP'ing, etc.
during export, have client poll this and give user better feedback as to what is happening
seems to generate other paths fine, but index.html is missing
The project I'm on cannot use the wp-content/uploads directory to export the static site to, even temporarily. I would like an option added to the export settings that lets you configure where the temporary files and zip file are written to.
<link rel='https://api.w.org/' href='http://172.17.0.3/wp-json/' />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://172.17.0.3/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://172.17.0.3/wp-includes/wlwmanifest.xml" />
<meta name="generator" content="WordPress 4.9.6" />
<link>
tags<link rel='prev' title='Removing comments for a WordPress static website' href='http://172.17.0.3/2018/04/28/removing-comments-for-a-wordpress-static-website/' />
<link rel="canonical" href="http://172.17.0.3/2018/05/11/scheduling-exports-of-your-static-site-from-wordpress/" />
<link rel='shortlink' href='http://172.17.0.3/?p=8' />
<link rel="alternate" type="application/json+oembed" href="http://172.17.0.3/wp-json/oembed/1.0/embed?url=http%3A%2F%2F172.17.0.3%2F2018%2F05%2F11%2Fscheduling-exports-of-your-static-site-from-wordpress%2F" />
<link rel="alternate" type="text/xml+oembed" href="http://172.17.0.3/wp-json/oembed/1.0/embed?url=http%3A%2F%2F172.17.0.3%2F2018%2F05%2F11%2Fscheduling-exports-of-your-static-site-from-wordpress%2F&format=xml" />
<link rel="pingback" href="http://172.17.0.3/xmlrpc.php">
Add user-editable, required fields for the following wp directories, using them in the cleanMeta function and in post processing of the export folder contents:
in code:
contents
lib
ui
theme
data
inc
in export file structure:
contents
lib
ui
theme
data
inc
link in readme. needs user added during provisioning and output ip (or use port?)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.