### Setup Virtual Environment and Install Livemark Source: https://livemark.frictionlessdata.io/pages/guides-and-tutorials/data-journalism.html Commands to initialize a Python virtual environment and install the Livemark package. ```bash $ python3 -m venv .python $ source .python/bin/activate ``` ```bash $ pip install livemark ``` -------------------------------- ### Start Development Server Source: https://livemark.frictionlessdata.io/pages/getting-started/starting-project.html Launch the livereload server to preview the project locally. ```bash $ livemark start ``` -------------------------------- ### Install Livemark Source: https://livemark.frictionlessdata.io/pages/getting-started/installation.html Use pip or pipx to install the Livemark library on your system. ```bash $ pip install livemark ``` -------------------------------- ### Install dependencies Source: https://livemark.frictionlessdata.io/pages/getting-started/contributing.html Installs the necessary project dependencies using the Makefile. ```bash $ make install ``` -------------------------------- ### Configure site settings Source: https://livemark.frictionlessdata.io/pages/feature-reference/general.html Example configuration for site assets like favicons and stylesheets. ```yaml site: favicon: assets/favicon.ico styles: - style.css ``` -------------------------------- ### Verify Installation Source: https://livemark.frictionlessdata.io/pages/getting-started/installation.html Check the installed version of Livemark to ensure the installation was successful. ```bash $ livemark --version ``` ```text 1.0.0 ``` -------------------------------- ### Install an external plugin Source: https://livemark.frictionlessdata.io/pages/plugin-system/adding-plugin.html Use pip to install a Livemark plugin package. ```bash $ pip install livemark-ckan ``` -------------------------------- ### Task output example Source: https://livemark.frictionlessdata.io/pages/feature-reference/markdown.html The rendered output of the executed task. ```text print('It is a task') ``` ```text It is a task ``` -------------------------------- ### Activate an external plugin Source: https://livemark.frictionlessdata.io/pages/plugin-system/adding-plugin.html Enable the installed plugin by adding its configuration to the livemark.yaml file. ```yaml ckan: true # or a plugin config ``` -------------------------------- ### Tabbed code snippets Source: https://livemark.frictionlessdata.io/pages/feature-reference/navigation.html Examples of CLI and Python code snippets organized under tabs. ```bash echo 'Hello World' ``` ```text Hello World ``` ```python print('Hello World') ``` ```text Hello World ``` -------------------------------- ### Initialize Project Directory Source: https://livemark.frictionlessdata.io/pages/getting-started/starting-project.html Create and enter a new directory for the project. ```bash $ mkdir my-project $ cd my-project ``` -------------------------------- ### Build a website using CLI Source: https://livemark.frictionlessdata.io/pages/feature-reference/general.html Commands to build a website from source files. These commands are functionally equivalent. ```bash $ livemark build $ livemark build index.md $ livemark build index.md --target index.html ``` -------------------------------- ### Build and Serve Commands Source: https://livemark.frictionlessdata.io/pages/getting-started/building-website.html Commands to generate static HTML or initiate a development server with automatic reloading. ```bash # Build a single document (index.md by default) $ livemark build ``` ```bash # Start a livereload server $ livemark start ``` -------------------------------- ### Clone the repository Source: https://livemark.frictionlessdata.io/pages/getting-started/contributing.html Initial steps to download the project source code and navigate to the directory. ```bash $ git clone git@github.com:frictionlessdata/livemark.git $ cd livemark ``` -------------------------------- ### Execute and List Tasks Source: https://livemark.frictionlessdata.io/pages/guides-and-tutorials/python-development.html Commands to list available tasks and execute them via the Livemark CLI. ```bash $ livemark run ``` ```bash test-lint test-code ``` ```bash $ livemark run test ``` ```bash Test Link Test Code ``` ```bash $ livemark run test-code ``` ```bash Test Code ``` -------------------------------- ### Configure Project Settings Source: https://livemark.frictionlessdata.io/pages/getting-started/starting-project.html Define site metadata and configuration in the livemark.yaml file. ```yaml brand: text: My Project site: favicon: assets/favicon.ico ``` -------------------------------- ### Define Main Page Source: https://livemark.frictionlessdata.io/pages/getting-started/starting-project.html Create the required index.md file to serve as the project homepage. ```markdown # My Project It will be great here ``` -------------------------------- ### Build and Serve with Custom Paths Source: https://livemark.frictionlessdata.io/pages/getting-started/building-website.html Specify a custom Markdown file path for building or serving if the default index.md is not used. ```bash $ livemark build path/to/your/file.md $ livemark start path/to/your/file.md ``` -------------------------------- ### Configure Prepare Commands Source: https://livemark.frictionlessdata.io/pages/feature-reference/others.html Specify a list of Bash commands to execute before the document building process begins. ```yaml prepare: - cp data/table.csv table.csv ``` -------------------------------- ### Include Local Files Source: https://livemark.frictionlessdata.io/pages/feature-reference/markdown.html Displays content from a local file with syntax highlighting. ```python '''python file livemark/__init__.py ''' ``` ```python from .config import Config from .document import Document from .markup import Markup from .plugin import Plugin from .project import Project from .program import program from .server import Server from .settings import VERSION as __version__ from .snippet import Snippet from .system import system from . import errors ``` -------------------------------- ### Implement pagination container Source: https://livemark.frictionlessdata.io/pages/feature-reference/navigation.html Use the livemark-pagination class to enable pagination for content blocks. ```html
Data Package
A simple container format for describing a coherent collection of data in a single package.
Data Package
A simple container format for describing a coherent collection of data in a single package.
```
--------------------------------
### Configure footer notes format
Source: https://livemark.frictionlessdata.io/pages/feature-reference/appearance.html
Defines the date format for the last updated timestamp shown in the footer.
```yaml
notes:
format: %Y-%m-%d
```
--------------------------------
### Render a Table Schema
Source: https://livemark.frictionlessdata.io/pages/feature-reference/markdown.html
Displays an interactive table schema based on a JSON descriptor file.
```yaml
'''yaml schema
descriptor: data/cars.schema.json
'''
```
--------------------------------
### Add external links to site configuration
Source: https://livemark.frictionlessdata.io/pages/feature-reference/navigation.html
Define external links to appear in the right column of the website.
```yaml
links:
items:
- name: Frictionless
path: https://frictionlessdata.io
- name: Discord
path: https://discord.com/channels/695635777199145130/695635777199145133
- name: Twitter
path: https://twitter.com/frictionlessd8a
```
--------------------------------
### Render Vega Lite Chart
Source: https://livemark.frictionlessdata.io/index.html
Use the yaml chart block to define visualisations. Replace single quotes with backticks to render.
```yaml
'''yaml chart
data:
url: data/cars.csv
mark: circle
selection:
brush:
type: interval
# other options are omitted
width: 500
height: 300
'''
```
--------------------------------
### Embed Audio or SoundCloud
Source: https://livemark.frictionlessdata.io/pages/feature-reference/markdown.html
Renders an audio file or SoundCloud track using a unique identifier.
```yaml
'''yaml audio/soundcloud
code: 34445479
'''
```
--------------------------------
### Add site news banner
Source: https://livemark.frictionlessdata.io/pages/feature-reference/appearance.html
Displays a news message at the top of the site.
```yaml
news:
text: It's test news
```
--------------------------------
### Override configuration with document frontmatter
Source: https://livemark.frictionlessdata.io/pages/getting-started/configuration.html
Use YAML frontmatter at the top of a markdown file to set document-specific configurations that take priority over project settings.
```yaml
---
site:
title: My Title
---
# My Document
```
--------------------------------
### Enable repository star rating
Source: https://livemark.frictionlessdata.io/pages/feature-reference/appearance.html
Configures the display of a GitHub repository's star rating based on the Github feature setting.
```yaml
rating:
type: start
```
--------------------------------
### Embed Data Visualizations
Source: https://livemark.frictionlessdata.io/pages/guides-and-tutorials/data-journalism.html
Using the chart extension to render data visualizations within Markdown.
```yaml
'''yaml chart
data:
url: ../../data/cars.csv
mark: circle
selection:
brush:
type: interval
# other options are omitted
width: 500
height: 300
'''
```
--------------------------------
### Configure table of contents selector
Source: https://livemark.frictionlessdata.io/pages/feature-reference/navigation.html
Specify the heading level used for the automatically generated table of contents in the project configuration.
```yaml
topics:
selector: h2
```
--------------------------------
### Process tabular data with Jinja
Source: https://livemark.frictionlessdata.io/index.html
Use the frictionless variable to iterate over CSV resources within Jinja templates.
```jinja
{% for car in frictionless.Resource('data/cars.csv').read_rows(size=5) %}
- {{ car.brand }} {{ car.model }}: ${{ car.price }}
{% endfor %}
```
--------------------------------
### Render a Video
Source: https://livemark.frictionlessdata.io/pages/feature-reference/markdown.html
Embeds a video file or a YouTube video using a unique identifier.
```yaml
'''yaml video/youtube
code: NMg-eCbO6L0
'''
```
--------------------------------
### Define Tasks in Markdown
Source: https://livemark.frictionlessdata.io/pages/guides-and-tutorials/python-development.html
Syntax for defining bash and python tasks within a Markdown file using task IDs.
```markdown
'''bash task id=test-lint
echo 'Test Lint'
'''
'''python task id=test-code
print('Test Code')
'''
```
--------------------------------
### Render a Validation Report
Source: https://livemark.frictionlessdata.io/pages/feature-reference/markdown.html
Displays an interactive validation report based on a JSON descriptor file.
```yaml
'''yaml report
descriptor: data/invalid.report.json
'''
```
--------------------------------
### Render a GeoJSON Map
Source: https://livemark.frictionlessdata.io/pages/feature-reference/markdown.html
Use the map directive to visualize GeoJSON data. Replace single quotes with backticks to execute.
```yaml
'''yaml map
data: data/france.json
'''
```
--------------------------------
### Create a Custom Plugin
Source: https://livemark.frictionlessdata.io/pages/plugin-system/writing-plugin.html
Defines a custom plugin class inheriting from Plugin that modifies H1 tags by injecting a span element.
```python
from livemark import Plugin
class CustomPlugin(Plugin):
identity = "custom"
# Process
def process_markup(self, markup):
markup.add_markup("(template)", target="h1")
```
--------------------------------
### Snippet (class)
Source: https://livemark.frictionlessdata.io/pages/feature-reference/markdown.html
Represents a Livemark snippet. Provides properties to access snippet metadata and a process method to handle document integration.
```APIDOC
## Snippet(input: str, *, header: List[str])
### Description
Initializes a new Snippet instance.
### Parameters
- **input** (str) - Required - Textual snippet content.
- **header** (List[str]) - Required - An array of the snippet's header.
### Properties
- **header** (List[str]) - Snippet's header.
- **input** (str) - Snippet's input.
- **lang** (str) - Snippet's lang.
- **output** (Optional[str]) - Snippet's output.
- **props** (Dict[str, Any]) - Snippet's props.
- **type** (str) - Snippet's type.
### Methods
- **process(document: Document) -> None** - Process the snippet within a given document.
```
--------------------------------
### Define Data Tasks in Markdown
Source: https://livemark.frictionlessdata.io/pages/guides-and-tutorials/data-journalism.html
Embedding bash and python tasks directly into Markdown files for data processing workflows.
```markdown
'''bash task id=data-extract
echo 'Data Extract'
'''
'''python task id=data-transform
print('Data Transform')
'''
'''python task id=data-load
print('Data Load')
'''
```
--------------------------------
### Define a Python task
Source: https://livemark.frictionlessdata.io/pages/feature-reference/markdown.html
Use the task identifier in the code block header to define a runnable Python script.
```python
'''python task id=example
print('It is a task')
'''
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.