Skip to content

Commit e2c021d

Browse files
committed
minor edits and add workflow
1 parent f5fd955 commit e2c021d

4 files changed

Lines changed: 75 additions & 2 deletions

File tree

.github/workflows/pages.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: build pages
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the "main" branch
8+
push:
9+
branches: ["main"]
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
21+
concurrency:
22+
group: "pages"
23+
cancel-in-progress: false
24+
25+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
26+
jobs:
27+
# This workflow contains a single job called "build"
28+
build:
29+
# The type of runner that the job will run on
30+
runs-on: ubuntu-latest
31+
32+
# Steps represent a sequence of tasks that will be executed as part of the job
33+
steps:
34+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
35+
- uses: actions/checkout@v4
36+
37+
- name: Install uv
38+
uses: astral-sh/setup-uv@v6
39+
40+
- name: Install dependencies
41+
run: uv sync
42+
43+
- name: Run MkDocs
44+
run: uv run mkdocs build
45+
46+
- name: Configure GitHub Pages
47+
uses: actions/configure-pages@v5
48+
49+
- name: Upload artifact
50+
uses: actions/upload-pages-artifact@v4
51+
with:
52+
path: "site"
53+
54+
deploy:
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
runs-on: ubuntu-latest
59+
needs: build
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4

docs/git.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ git add .
1919
git commit -m 'fixed everything' # save everything you did
2020
entangled tangle --force # overwrites some changes you made
2121
git restore src/brilliant_code.c # retrieve from latest commit
22+
touch src/brilliant_code.c # set modification time of the file
2223
entangled stitch # apply changes back to markdown
2324
git add .
2425
git commit --amend # amend your commit to perfection

docs/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Welcome to Entangled
22
![PyPI - Version](https://img.shields.io/pypi/v/entangled-cli)
3+
[![Upload Python Package](https://github.com/entangled/entangled.py/actions/workflows/deploy.yml/badge.svg)](https://github.com/entangled/entangled.py/actions/workflows/deploy.yml)
4+
[![Python package](https://github.com/entangled/entangled.py/actions/workflows/python-package.yml/badge.svg)](https://github.com/entangled/entangled.py/actions/workflows/python-package.yml)
35

46
**Entangled** lets you write code and proze in a single document. It extracts working source code from your documentation, and keeps the documentation and source code mutualy synchronized. Entangled works with any programming language and supports a wide variety of markup languages, principally most dialects of Markdown.
57

docs/markup.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ tags:
1010

1111
# Document Markup Languages
1212

13-
The default setting is to use attributes enclosed in curly braces. This offers a relatively noise-free syntax for denoting code blocks, their labels and file targets. However, not all document generators understand this syntax.
13+
The default setting is to use attributes enclosed in curly braces. This offers a relatively noise-free syntax for denoting code blocks, their labels and file targets. However, not all document generators understand this syntax.
14+
1415

1516
## Vanilla (Github flavoured) Markdown and Typst
1617

@@ -37,7 +38,6 @@ if __name__ == "__main__":
3738
This needs the following `entangled.toml`:
3839

3940
```toml
40-
#| file: entangled.toml
4141
version="2.0"
4242
hooks=["quarto_attributes"]
4343

@@ -46,6 +46,13 @@ open="^(?P<indent>\\s*)```(?P<properties>.*)$"
4646
close="^(?P<indent>\\s*)```\\s*$"
4747
```
4848

49+
Or, use the `basic` style setting to the same effect:
50+
51+
```toml
52+
version="2.4"
53+
style="basic"
54+
```
55+
4956
## Not yet implemented: Restructured Text
5057

5158
Restructured text is quite different from Markdown. The following needs an additional hook to parse the attribute section:

0 commit comments

Comments
 (0)