function minisite_help in Mini site 8
Same name and namespace in other branches
- 7 minisite.module \minisite_help()
Implements hook_help().
File
- ./
minisite.module, line 25 - Main functions of the Minisite module.
Code
function minisite_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.minisite':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Used to upload and run self contained structured but static content as "mini websites".') . '</p>';
$output .= '<h3>' . t('Archives') . '</h3>';
$output .= '<p>' . t('Supported archive files are <code>@archives</code>.', [
'@archives' => implode(', ', Minisite::supportedArchiveExtensions()),
]) . '</p>';
$output .= '<p>' . t('Archives must abide by the following constraints:') . '</p>';
$output .= '<ul>';
$output .= ' <li>' . t('Must contain only one top-level directory.') . '</li>';
$output .= ' <li>' . t('Must contain only files with extensions from the "allowed list" (configured for each field).') . '</li>';
$output .= ' <li>' . t('Must contain <code>@index</code> page under topmost root directory.', [
'@index' => AssetInterface::INDEX_FILE,
]) . '</li>';
$output .= ' <li>' . t('Should contain pages with relative links.') . '</li>';
$output .= '</ul>';
$output .= '<h3>' . t('URL rewrite (alias)') . '</h3>';
$output .= '<p>' . t('Applies when the "Use alias" option is selected after a mini-site archive is uploaded.</p>');
$output .= '<p>' . t('A mini-site served through an aliased URL updates internal links that are rewritten based on the following rules:') . '</p>';
$output .= '<ul>';
$output .= ' <li>';
$output .= ' <p>' . t('For <code><a></code> tag:') . '</p>';
$output .= ' <ul>';
$output .= ' <li>' . t('If link is external, do not alter it.') . '</li>';
$output .= ' <li>' . t('If link is to the HTML document and relative to root (starts with <code>./</code> or <code>/</code>), rewrite it to point to the aliased path.') . '</li>';
$output .= ' <li>' . t('If link is to the HTML document and relative to other documents (starts with <code>../</code>), rewrite it to always point to the aliased path.') . '</li>';
$output .= ' <li>' . t('If link is to the non-HTML file, rewrite it to always point to the expanded file in the file system.') . '</li>';
$output .= ' </ul>';
$output .= ' </li>';
$output .= ' <li>';
$output .= ' <p>' . t('For <code><link></code>, <code><script></code> and <code><img></code> tags:') . '</p>';
$output .= ' <ul>';
$output .= ' <li>' . t('If link is external, do not alter it.') . '</li>';
$output .= ' <li>' . t('All other types of links are rewritten to always point to the expanded file in the file system.') . '</li>';
$output .= ' </ul>';
$output .= ' </li>';
$output .= ' <li>' . t('The <code><base></code> tag in <code><head></code> is always removed.') . '</li>';
$output .= '</ul>';
return $output;
}
}