<commit_before>[b]Creating Web Pages[/b]

Red enables users to create static webpages.  To activate this feature, enable the web pages feature in your Additional Features section.

Once enabled, a new tab will appear on your channel page labelled &quot;Webpages&quot;.  Clicking this link will take you to the webpage editor.  Here you can create a post using either BBCode or the rich text editor.

Pages will be accessible at mydomain/page/username/pagelinktitle

The &quot;page link title&quot; box allows a user to specify the &quot;pagelinktitle&quot; of this URL.  If no page link title is set, we will set one for you automatically, using the message ID of the item.  

Beneath the page creation box, a list of existing pages will appear with an &quot;edit&quot; link.  Clicking this will take you to an editor, similar to that of the post editor, where you can make changes to your webpages.

#include doc/macros/main_footer.bb;

<commit_msg>some doco on webpage blocks<commit_after>[b]Creating Web Pages[/b]

Red enables users to create static webpages.  To activate this feature, enable the web pages feature in your Additional Features section.

Once enabled, a new tab will appear on your channel page labelled &quot;Webpages&quot;.  Clicking this link will take you to the webpage editor.
Pages will be accessible at mydomain/page/username/pagelinktitle

The &quot;page link title&quot; box allows a user to specify the &quot;pagelinktitle&quot; of this URL.  If no page link title is set, we will set one for you automatically, using the message ID of the item.  

Beneath the page creation box, a list of existing pages will appear with an &quot;edit&quot; link.  Clicking this will take you to an editor, similar to that of the post editor, where you can make changes to your webpages.


[b]Using Blocks[/b]

Blocks can be parts of webpages. The basic HTML of a block looks like this
[code]
	<div>
		Block Content
	</div>

[/code]

If a block has text/html content type it can also contain menu elements. Sample content of
[code]
	<p>HTML block content</p> 
	[menu]menuname[/menu]

[/code]
will produce HTML like this
[code]
	<div>
		<p>HTML block content</p>
		<div>
			<ul>
				<li><a href="#">Link 1</a></li>
				<li><a href="#">Link 2</a></li>
				<li><a href="#">Link 3</a></li>
			</ul>
		</div>
	</div>

[/code]

Via the $content macro a block can also contain the actual webpage content. For this create a block with only
[code]
	$content

[/code]as content.

To make a block appear in the webpage it must be defined in the page layout inside a region.
[code]
	[region=aside]
		[block]blockname[/block]
	[/region]

[/code]

The block appearance can be manipulated in the page layout.

Custom classes can be assigned
[code]
	[region=aside]
		[block=myclass]blockname[/block]
	[/region]

[/code]
will produce this HTML
[code]
	<div class="myclass">
		Block Content
	</div>

[/code]

Via the wrap variable a block can be stripped off its wrapping <div></div> tag
[code]
	[region=aside]
		[block][var=wrap]none[/var]blockname[/block]
	[/region]

[/code]
will produce this HTML
[code]
	Block Content

[/code]


#include doc/macros/main_footer.bb;


{'fraction_non_alphanumeric': 0.08682360134515439, 'fraction_numerical': 0.0009171507184347294, 'mean_word_length': 3.513103448275862, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2681013', 'n_tokens_mistral': 1064, 'n_tokens_neox': 964, 'n_words': 454}