Skip to content

Add Website Preview plugin#495

Merged
asmecher merged 2 commits into
pkp:mainfrom
Junhao-Han:website-preview
Jun 10, 2026
Merged

Add Website Preview plugin#495
asmecher merged 2 commits into
pkp:mainfrom
Junhao-Han:website-preview

Conversation

@Junhao-Han

Copy link
Copy Markdown

Adds Website Preview, a generic OJS plugin for previewing static website projects submitted as ZIP files from the OJS workflow page.

The plugin registers a Web Project file type, adds a Website preview action in the workflow, selects a clear index.html entry point, and renders the project in a sandboxed preview frame.

Tested against OJS 3.3.0-21.

@asmecher

asmecher commented Jun 9, 2026

Copy link
Copy Markdown
Member

@Junhao-Han, thanks for submitting! At a glance, the tests directory contains some potentially dangerous scripts. If these are invoked via the web server by guessing the URL, they can have unexpected consequences. I would suggest using PHPUnit-style tests, which are encapsulated in classes. Alternately, you can exclude those from the plugin package (if you're using the build tool described in the plugin guide, you can list files/paths to exclude in an exclusions.txt file in the plugin repo).

@Junhao-Han

Junhao-Han commented Jun 9, 2026

Copy link
Copy Markdown
Author

@asmecher, thanks for the review. I converted the archive tests from a directly executable smoke script into a PHPUnit-style test class, so the test file no longer performs actions if reached through the web server.

I published a new plugin release, 1.0.0.1, and updated this PR to point to the new package and MD5. The updated package contains tests/WebsitePreviewArchiveServiceTest.php instead of the previous executable smoke script.

@asmecher asmecher merged commit 57c2e2a into pkp:main Jun 10, 2026
@asmecher

Copy link
Copy Markdown
Member

Thanks, @Junhao-Han, I've merged the plugin!

@Junhao-Han

Copy link
Copy Markdown
Author

Thank you very much, @asmecher !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants