Skip to content

Commit

Permalink
Adjust some md examples and their source
Browse files Browse the repository at this point in the history
  • Loading branch information
mdellweg committed Jul 19, 2024
1 parent 24a8ea2 commit e470dcc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/pulp_docs/data/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
site_name: Pulp Project
site_url: https://staging-docs.pulpproject.org/
site_url: https://docs.pulpproject.org/
repo_url: https://github.com/pulp/pulpcore
repo_name: pulp/pulpcore

Expand Down Expand Up @@ -29,13 +29,13 @@ theme:
primary: custom
accent: black
toggle:
icon: material/toggle-switch-off-outline
icon: material/toggle-switch-off-outline
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
scheme: slate
toggle:
icon: material/toggle-switch
name: Switch to light mode
name: Switch to light mode
hooks:
- '../mkdocs_hooks.py'
plugins:
Expand All @@ -51,7 +51,7 @@ plugins:
- literate-nav:
nav_file: _SUMMARY.md
- mkdocstrings:
handlers:
handlers:
python:
options:
show_source: false
Expand Down
11 changes: 6 additions & 5 deletions staging_docs/dev/reference/markdown-cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ The basic syntax is:
Ordering is enabled by `mkdocs-literate-nav`
(learn more [here](https://oprypin.github.io/mkdocs-literate-nav/reference.html)).

The basic setup is having a a file in `{repo}/docs/{user}/{persona}/_SUMMARY.md`.
The basic setup is having a file in `{repo}/docs/{persona}/{doc_type}/_SUMMARY.md`.
In this file you should use the following syntax:

```markdown title="pulp_rpm/docs/user/guides/_SUMMARY.md"
```markdown title="pulp_plugin/docs/user/guides/_SUMMARY.md"
# Basic
* [First list item](z-page.md)
* [Second list item](m-page.md)
Expand All @@ -87,7 +87,7 @@ In this file you should use the following syntax:
# Recursive Globs
* [I want this first](some-page.md)
* *.md
* [This last and recurse this dir](other/)
* [This last and recurse this dir](other/)
```

### Codeblocks
Expand All @@ -111,6 +111,7 @@ Markdown syntax:
serializer = mymodelserializer(data=data)
serializer.is_valid(raise_exception=true)
instance = serializer.create(serializer.validated_data)
print(instance)
```
````

Expand All @@ -125,11 +126,11 @@ The codeblock can also have a title, which is useful if its a file:
Markdown syntax:

````
```bash title="script.sh"
```bash title="sample-title-here.sh"
pulp file repository update --name myrepo --retained-versions 1
```
````

### Admonitions

[See mkdocs-material](https://squidfunk.github.io/mkdocs-material/reference/admonitions/#supported-types)
Expand Down

0 comments on commit e470dcc

Please sign in to comment.