{"id":27197752,"url":"https://github.com/preaction/mojolicious-plugin-export","last_synced_at":"2025-10-25T20:48:19.298Z","repository":{"id":56833889,"uuid":"156501221","full_name":"preaction/Mojolicious-Plugin-Export","owner":"preaction","description":"Export a Mojolicious webapp to static files","archived":false,"fork":false,"pushed_at":"2021-03-21T20:45:28.000Z","size":61,"stargazers_count":0,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-17T21:17:02.577Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/preaction.png","metadata":{"files":{"readme":"README.mkdn","changelog":"CHANGES","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-07T06:33:58.000Z","updated_at":"2024-04-17T21:17:02.578Z","dependencies_parsed_at":"2022-09-08T07:41:54.519Z","dependency_job_id":null,"html_url":"https://github.com/preaction/Mojolicious-Plugin-Export","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preaction%2FMojolicious-Plugin-Export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preaction%2FMojolicious-Plugin-Export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preaction%2FMojolicious-Plugin-Export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preaction%2FMojolicious-Plugin-Export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preaction","download_url":"https://codeload.github.com/preaction/Mojolicious-Plugin-Export/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248106833,"owners_count":21048803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-09T20:29:30.527Z","updated_at":"2025-10-25T20:48:14.256Z","avatar_url":"https://github.com/preaction.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/preaction/Mojolicious-Plugin-Export.svg?branch=master)](https://travis-ci.org/preaction/Mojolicious-Plugin-Export)\n[![Coverage Status](https://coveralls.io/repos/preaction/Mojolicious-Plugin-Export/badge.svg?branch=master)](https://coveralls.io/r/preaction/Mojolicious-Plugin-Export?branch=master)\n\n# NAME\n\nMojolicious::Plugin::Export - Export a Mojolicious website to static files\n\n# VERSION\n\nversion 0.008\n\n# SYNOPSIS\n\n    use Mojolicious::Lite;\n    get '/' =\u003e 'index';\n    get '/secret' =\u003e 'secret';\n    plugin Export =\u003e {\n        pages =\u003e [qw( / /secret )],\n    };\n    app-\u003estart;\n\n# DESCRIPTION\n\nDeploy a Mojolicious webapp to static files.\n\n## Configuration\n\nDefault values for the command's options can be specified in the\nconfiguration using one of Mojolicious's configuration plugins.\n\n    # myapp.conf\n    {\n        export =\u003e {\n            # Configure the default pages to export\n            pages =\u003e [ '/', '/hidden' ],\n            # The directory to export to\n            to =\u003e '/var/www/html',\n            # Rewrite URLs to include base directory\n            base =\u003e '/',\n        }\n    }\n\n# ATTRIBUTES\n\n## pages\n\nThe pages to export by default. This can be overridden by the arguments to\n[\"export\"](#export).\n\n    # Add pages to export by default\n    push @{ $app-\u003eexport-\u003epages }, '/blog';\n\n## to\n\nThe path to export to by default.\n\n## base\n\nThe base URL, if URLs need to be rewritten.\n\n## quiet\n\nIf true, will not report every action taken by the plugin. Defaults to true.\n\n# METHODS\n\n## export\n\n    app-\u003eexport-\u003eexport( $override );\n\nExport the site. `$override` is a hash reference to override the object\nattributes (keys are attribute names, values are the overridden value).\n\n# HELPERS\n\n## export\n\nThe `export` helper returns the [Mojolicious::Plugin::Export](https://metacpan.org/pod/Mojolicious::Plugin::Export) object.\n\n# EVENTS\n\n## before\\_write\n\nEmitted after all the content has been loaded and prepared for export.\nThe event is given two arguments: The Mojolicious::Plugin::Export object\nand a hashref of paths mapped to content to be exported. The content can\nbe either a Mojo::DOM object for HTML pages or the content to be\nexported. This event may modify the hashref or the DOM objects to change\nthe content before it is written.\n\n    app-\u003eexport-\u003eon( before_write =\u003e sub {\n        my ( $export, $pages ) = @_;\n        for my $path ( keys %$pages ) {\n            my $content = $pages-\u003e{ $path };\n            # ...\n        }\n    } );\n\n# SEE ALSO\n\n[Mojolicious::Command::export](https://metacpan.org/pod/Mojolicious::Command::export), [Mojolicious::Plugin::Export::Git](https://metacpan.org/pod/Mojolicious::Plugin::Export::Git), [Mojolicious::Plugin](https://metacpan.org/pod/Mojolicious::Plugin)\n\n# AUTHOR\n\nDoug Bell \u003cpreaction@cpan.org\u003e\n\n# COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2018 by Doug Bell.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreaction%2Fmojolicious-plugin-export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreaction%2Fmojolicious-plugin-export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreaction%2Fmojolicious-plugin-export/lists"}