Skip to content

Commit 083b4c8

Browse files
committed
Added support for site.layout config
1 parent 4264fc1 commit 083b4c8

6 files changed

Lines changed: 13 additions & 7 deletions

File tree

404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2564,7 +2564,7 @@ <h5 class="modal-title"></h5>
25642564
'name': 'Release',
25652565
'path': 'pages/release',
25662566
'relpath': 'pages/release',
2567-
'text': "# Release ## Current Current Livemark Version: ```html markup v0.85.0 | PyPi ``` ## History This section only describes the most significant changes, including breaking changes. The full changelog and documentation for all released versions can be found in the nicely formatted [commit history](https://github.com/frictionlessdata/livemark/commits/main). ### v0.80 - Rebased `table` from HandOnTable to DataTables backend",
2567+
'text': "# Release ## Current Current Livemark Version: ```html markup v0.85.1 | PyPi ``` ## History This section only describes the most significant changes, including breaking changes. The full changelog and documentation for all released versions can be found in the nicely formatted [commit history](https://github.com/frictionlessdata/livemark/commits/main). ### v0.80 - Rebased `table` from HandOnTable to DataTables backend",
25682568
},
25692569
'pages/forum': {
25702570
'name': 'Forum',

blog/2021-09-01-meet-livemark.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2573,7 +2573,7 @@ <h5 class="modal-title"></h5>
25732573
'name': 'Release',
25742574
'path': 'pages/release',
25752575
'relpath': '../pages/release',
2576-
'text': "# Release ## Current Current Livemark Version: ```html markup v0.85.0 | PyPi ``` ## History This section only describes the most significant changes, including breaking changes. The full changelog and documentation for all released versions can be found in the nicely formatted [commit history](https://github.com/frictionlessdata/livemark/commits/main). ### v0.80 - Rebased `table` from HandOnTable to DataTables backend",
2576+
'text': "# Release ## Current Current Livemark Version: ```html markup v0.85.1 | PyPi ``` ## History This section only describes the most significant changes, including breaking changes. The full changelog and documentation for all released versions can be found in the nicely formatted [commit history](https://github.com/frictionlessdata/livemark/commits/main). ### v0.80 - Rebased `table` from HandOnTable to DataTables backend",
25772577
},
25782578
'pages/forum': {
25792579
'name': 'Forum',

blog/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2576,7 +2576,7 @@ <h5 class="modal-title"></h5>
25762576
'name': 'Release',
25772577
'path': 'pages/release',
25782578
'relpath': '../pages/release',
2579-
'text': "# Release ## Current Current Livemark Version: ```html markup v0.85.0 | PyPi ``` ## History This section only describes the most significant changes, including breaking changes. The full changelog and documentation for all released versions can be found in the nicely formatted [commit history](https://github.com/frictionlessdata/livemark/commits/main). ### v0.80 - Rebased `table` from HandOnTable to DataTables backend",
2579+
'text': "# Release ## Current Current Livemark Version: ```html markup v0.85.1 | PyPi ``` ## History This section only describes the most significant changes, including breaking changes. The full changelog and documentation for all released versions can be found in the nicely formatted [commit history](https://github.com/frictionlessdata/livemark/commits/main). ### v0.80 - Rebased `table` from HandOnTable to DataTables backend",
25802580
},
25812581
'pages/forum': {
25822582
'name': 'Forum',

livemark/plugins/site/plugin.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class SitePlugin(Plugin):
1818
"description": {"type": "string"},
1919
"keywords": {"type": "string"},
2020
"favicon": {"type": "string"},
21+
"layout": {"type": "string"},
2122
"styles": {"type": "array"},
2223
"scripts": {"type": "array"},
2324
},
@@ -46,6 +47,11 @@ def favicon(self):
4647
if self.config.get("favicon"):
4748
return helpers.get_relpath(self.config.get("favicon"), self.document.path)
4849

50+
@property
51+
def layout(self):
52+
layout = self.config.get('layout')
53+
return os.path.abspath(layout) if layout else 'markup.html'
54+
4955
@property
5056
def styles(self):
5157
styles = []
@@ -66,7 +72,7 @@ def scripts(self):
6672

6773
def process_document(self, document):
6874
if document.format == "html":
69-
markup = Markup(self.read_asset("markup.html", plugin=self))
75+
markup = Markup(self.read_asset(self.layout))
7076
with markup.bind(self):
7177
bs_url = "https://unpkg.com/bootstrap@4.6.0"
7278
fa_url = "https://unpkg.com/@fortawesome/fontawesome-free@5.15.4"

pages/forum.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2588,7 +2588,7 @@ <h5 class="modal-title"></h5>
25882588
'name': 'Release',
25892589
'path': 'pages/release',
25902590
'relpath': 'release',
2591-
'text': "# Release ## Current Current Livemark Version: ```html markup v0.85.0 | PyPi ``` ## History This section only describes the most significant changes, including breaking changes. The full changelog and documentation for all released versions can be found in the nicely formatted [commit history](https://github.com/frictionlessdata/livemark/commits/main). ### v0.80 - Rebased `table` from HandOnTable to DataTables backend",
2591+
'text': "# Release ## Current Current Livemark Version: ```html markup v0.85.1 | PyPi ``` ## History This section only describes the most significant changes, including breaking changes. The full changelog and documentation for all released versions can be found in the nicely formatted [commit history](https://github.com/frictionlessdata/livemark/commits/main). ### v0.80 - Rebased `table` from HandOnTable to DataTables backend",
25922592
},
25932593
'pages/forum': {
25942594
'name': 'Forum',

pages/release.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2024,7 +2024,7 @@ <h1>Release</h1>
20242024
<h2>Current</h2>
20252025
<p>Current Livemark Version:</p>
20262026
<p class="lead" style="font-size: 30px;">
2027-
<strong>v0.85.0</strong>
2027+
<strong>v0.85.1</strong>
20282028
| <a href="https://pypi.org/project/livemark/">PyPi</a>
20292029
</p>
20302030
<h2>History</h2>
@@ -2570,7 +2570,7 @@ <h5 class="modal-title"></h5>
25702570
'name': 'Release',
25712571
'path': 'pages/release',
25722572
'relpath': 'release',
2573-
'text': "# Release ## Current Current Livemark Version: ```html markup v0.85.0 | PyPi ``` ## History This section only describes the most significant changes, including breaking changes. The full changelog and documentation for all released versions can be found in the nicely formatted [commit history](https://github.com/frictionlessdata/livemark/commits/main). ### v0.80 - Rebased `table` from HandOnTable to DataTables backend",
2573+
'text': "# Release ## Current Current Livemark Version: ```html markup v0.85.1 | PyPi ``` ## History This section only describes the most significant changes, including breaking changes. The full changelog and documentation for all released versions can be found in the nicely formatted [commit history](https://github.com/frictionlessdata/livemark/commits/main). ### v0.80 - Rebased `table` from HandOnTable to DataTables backend",
25742574
},
25752575
'pages/forum': {
25762576
'name': 'Forum',

0 commit comments

Comments
 (0)