StaticWebEpiserverPlugin 1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package StaticWebEpiserverPlugin --version 1.0.0
NuGet\Install-Package StaticWebEpiserverPlugin -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="StaticWebEpiserverPlugin" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add StaticWebEpiserverPlugin --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: StaticWebEpiserverPlugin, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install StaticWebEpiserverPlugin as a Cake Addin #addin nuget:?package=StaticWebEpiserverPlugin&version=1.0.0 // Install StaticWebEpiserverPlugin as a Cake Tool #tool nuget:?package=StaticWebEpiserverPlugin&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
EpiServer - StaticWeb (Example)
Project is built on top of vanilla EpiServer Alloy website.
Introduction
Project showcasing creating a static website but still using EpiServer CMS for editorial changes.
Pro
- Reliable serverside response time
- Very easy to scale up
- No database dependency for visitor
- No serverside code requried
- Very secure (hard to hack static pages)
Con/limitations
- No serverside dynamic content can be used
- No serverside personalized content can be used
- Only pages inheriting from PageData will trigger page write
- Only block inheriting from BlockBata will trigger page write
- Only supports following types:
- css (only support dependencies declared in url())
- javascript (no dependencies)
- Web fonts (woff and woff2)
- Images (png, jpg, jpeg, jpe, gif, webp)
- documents (pdf)
- Icons (ico)
Requirements
- EpiServer 7.5+
- .Net 4.7+
- All pages need to inherit from PageData
- All blocks needs to inherit from BlockData
- Website has to return pages, javascript and css as UTF-8
- Must allow visits with user-agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36 StaticWebPlugin/0.1
Installation
- Copy
StaticWebEpiserverPlugin
folder and addStaticWebEpiserverPlugin.csproj
into your solution. - Change
rootUrl
in Initialization/StaticWebInitialization.cs to your website url (must allow anonymous access) - Change
rootPath
in Initialization/StaticWebInitialization.cs to folder you want to write to (for example a GitHub repository folder)
When is running?
- Do changes for a page or block(must be placed on a page) in EpiServer and publish your changes.
- StaticWebPlugin will now try to access your website and write back the result it gets to the folder you have entered.
What extra functionality can be used
- StaticWeb is registering a displaychannel called "StaticWeb" (See
Header.cshtml
andHeader.staticweb.cshtml
for examples on how to use it). It is perfect for removing functionality that can't be used in a static website (like filitering or search). It also makes it possible for you to view how the page will look and work on the static version.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- Castle.Core (>= 4.2.1)
- EPiServer.CMS (>= 11.12.0)
- EPiServer.CMS.UI.Core (>= 11.20.1)
- EPiServer.Framework (>= 11.12.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release. Includes generating pages on publishing event and scheduled job