Skip to content

Commit 127a593

Browse files
Rafid Bin Mostofacjdcordeiroclay-lakeyhontyk
authored
feat: add guide on how to create slice definitions (#15)
--------- Signed-off-by: Cristovao Cordeiro <cristovao.cordeiro@canonical.com> Co-authored-by: Cristovao Cordeiro <cristovao.cordeiro@canonical.com> Co-authored-by: Adrian Clay Lake <clay.lake@canonical.com> Co-authored-by: Yana Hontyk <yana.hontyk@canonical.com>
1 parent 930ddd4 commit 127a593

File tree

5 files changed

+686
-9
lines changed

5 files changed

+686
-9
lines changed

docs/.custom_wordlist.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,26 @@ Dockerfile
44
GID
55
Levenshtein
66
OpenPGP
7+
OpenSSL
8+
OpenSSL's
79
PPAs
810
SBOM
11+
SDF
912
SDFs
1013
Starlark
1114
Subcommands
1215
UID
1316
ZSTD
17+
amd
18+
amd64
19+
analyze
1420
armor
1521
armored
1622
basename
23+
behavior
1724
chiseled
25+
conffiles
26+
config
1827
distroless
1928
entrypoint
2029
esm
@@ -24,14 +33,19 @@ http
2433
https
2534
initialize
2635
jsonwall
36+
linters
37+
manpages
38+
openssl
2739
optimize
2840
recognized
41+
repo
2942
rootfs
3043
runtime
3144
schemas
3245
subcommand
3346
subcommands
3447
symlink
48+
symlinks
3549
ubuntu
3650
whitespace
3751
yaml
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
document.addEventListener("DOMContentLoaded", () => {
2+
document.querySelectorAll("input[type='checkbox'][disabled]").forEach(cb => {
3+
cb.removeAttribute("disabled");
4+
});
5+
});

docs/conf.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,16 @@
145145
# TODO: To enable or disable the Previous / Next buttons at the bottom of pages
146146
# Valid options: none, prev, next, both
147147
"sequential_nav": "both",
148-
149-
# Required for feedback button
150-
'github_issues': 'enabled',
148+
# Required for feedback button
149+
"github_issues": "enabled",
151150
}
152151

153152
# Project slug; see https://meta.discourse.org/t/what-is-category-slug/87897
154153
#
155154
# TODO: If your documentation is hosted on https://docs.ubuntu.com/,
156155
# uncomment and update as needed.
157156

158-
slug = 'chisel'
157+
slug = "chisel"
159158

160159

161160
# Template and asset locations
@@ -206,7 +205,9 @@
206205
# NOTE: By default, the following MyST extensions are enabled:
207206
# substitution, deflist, linkify
208207

209-
# myst_enable_extensions = set()
208+
myst_enable_extensions = set(
209+
["substitution", "deflist", "linkify", "tasklist", "attrs_inline"]
210+
)
210211

211212

212213
# Custom Sphinx extensions; see
@@ -249,12 +250,14 @@
249250

250251
# Adds custom JavaScript files, located under 'html_static_path'
251252

252-
# html_js_files = []
253+
html_js_files = [
254+
"js/checkbox.js",
255+
]
253256

254257

255258
# Specifies a reST snippet to be appended to each .rst file
256259

257-
if os.path.exists('./reuse/links.txt'):
260+
if os.path.exists("./reuse/links.txt"):
258261
rst_epilog = """
259262
.. include:: /reuse/links.txt
260263
"""
@@ -263,8 +266,8 @@
263266
# formatting, use substitutions.
264267
# https://canonical-documentation-with-sphinx-and-readthedocscom.readthedocs-hosted.com/style-guide-myst/#substitution
265268

266-
if os.path.exists('./reuse/substitutions.yaml'):
267-
with open('./reuse/substitutions.yaml', 'r') as fd:
269+
if os.path.exists("./reuse/substitutions.yaml"):
270+
with open("./reuse/substitutions.yaml", "r") as fd:
268271
myst_substitutions = yaml.safe_load(fd.read())
269272

270273
# Feedback button at the top; enabled by default

docs/how-to/index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,15 @@ with Ubuntu Pro.
3939
4040
install-pro-package-slices
4141
```
42+
43+
44+
## Creating a slice definition
45+
46+
Creating slice definitions can be simple and fun. Make sure to follow the best
47+
practices.
48+
49+
```{toctree}
50+
:maxdepth: 1
51+
52+
slice-a-package
53+
```

0 commit comments

Comments
 (0)