add the ability to specify the content license in the footer
e.g. for marking all pages as CC BY-SA 4.0 Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
@@ -217,3 +217,15 @@ def test_index_in_source_link_is_stripped():
|
||||
assert '<a href=".#anchor">Anchored This Index</a>' in content
|
||||
assert '<a href="../">Parent</a>' in content
|
||||
assert '<a href="../#anchor">Anchored Parent</a>' in content
|
||||
|
||||
|
||||
def test_license_link():
|
||||
"""Test that the config's license HTML is displayed in the footer."""
|
||||
with patch('incorporealcms.Config.LICENSE',
|
||||
'<a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>', create=True):
|
||||
assert 'Available via <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>.'\
|
||||
in handle_markdown_file_path('index.md', PAGES_DIR)
|
||||
|
||||
# default, no config
|
||||
assert '<a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>'\
|
||||
not in handle_markdown_file_path('index.md', PAGES_DIR)
|
||||
|
||||
Reference in New Issue
Block a user