File tree Expand file tree Collapse file tree 9 files changed +909
-326
lines changed Expand file tree Collapse file tree 9 files changed +909
-326
lines changed Original file line number Diff line number Diff line change
1
+ nav:
2
+ - Home: index.md
3
+ - Learn: learn
4
+ - How it works: how.md
5
+ - API: api.md
6
+ - Compatibility: compatibility.md
7
+ - Credits: credits.md
8
+ - Licenses: licenses.md
Original file line number Diff line number Diff line change
1
+ # API
2
+
3
+ ::: pyhtml.create_tag
4
+
5
+ ::: pyhtml.Tag
6
+ options:
7
+ members:
8
+ - children
9
+ - attributes
10
+ - render
11
+ - "_ get_tag_name"
12
+ - "_ get_default_attributes"
13
+ - "_ get_tag_pre_content"
14
+ - "_ escape_children"
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ problem with the following steps:
10
10
2 . Parse the markdown to gather all tag names and descriptions, discarding
11
11
garbage data and obsolete tags.
12
12
13
- 3 . Use data from a YAML configuration file ([ ` meta/tags.yml ` ] ( meta/tags.yml ) )
13
+ 3 . Use data from a YAML configuration file ([ ` meta/tags.yml ` ] ( https://github.com/COMP1010UNSW/pyhtml-enhanced/blob/main/ meta/tags.yml) )
14
14
to gather information on suggested attributes and base classes to use for
15
15
each tag.
16
16
Original file line number Diff line number Diff line change 1
1
# ` <PyHTML/> `
2
2
3
- A library for building HTML documents with a simple and learnable syntax,
4
- inspired by (and similar to)
5
- [ Cenk Altı's PyHTML library] ( https://github.com/cenkalti/pyhtml ) , but
6
- with improved documentation and type safety.
3
+ Build HTML documents in Python with a simple and learnable syntax.
7
4
8
5
## Usage
9
6
10
- Consider visiting the [ learn PyHTML page] ( ./learn ) .
7
+ * [ Learn PyHTML] ( ./learn/index.md )
8
+ * [ View the cheatsheet] ( ./learn/cheatsheet.md )
11
9
12
10
``` py
13
11
>> > import pyhtml as p
Original file line number Diff line number Diff line change
1
+ : root > * {
2
+ /* Fix up the primary colours */
3
+ --md-primary-fg-color : # ffcd29 !important ;
4
+ --md-accent-fg-color : # ffcd29 !important ;
5
+ --md-primary-fg-color--light : # ffe08a !important ;
6
+ --md-primary-fg-color--dark : # ad7a0b !important ;
7
+ --md-accent-fg-color--light : # ffc38a !important ;
8
+ --md-accent-fg-color--dark : # ad740b !important ;
9
+ --md-typeset-a-color : # ffc853 !important ;
10
+ }
11
+
12
+ .md-header {
13
+ /* Text colour on header */
14
+ color : # ffffff !important ;
15
+ }
16
+
17
+ /* Search box background */
18
+ @media screen and (min-width : 60em ) {
19
+ .md-search__form {
20
+ background-color : # ffffff42 !important ;
21
+ }
22
+ }
23
+
24
+ /* Search icon color */
25
+ .md-search__icon {
26
+ color : # ececec !important ;
27
+ }
28
+
29
+ div .md-header__topic : first-child {
30
+ font-weight : normal;
31
+ }
32
+
33
+ div .doc-contents : not (.first ) {
34
+ padding-left : 2rem ;
35
+ border-left : 0.1rem solid var (--md-typeset-table-color );
36
+ }
Original file line number Diff line number Diff line change
1
+ site_name : PyHTML
2
+ site_description : Documentation for PyHTML
3
+ repo_name : " COMP1010UNSW/PyHTML-Enhanced"
4
+ repo_url : https://github.com/COMP1010UNSW/pyhtml-enhanced
5
+ copyright : © 2024 COMP1010 UNSW
6
+
7
+ # Build to a temporary directory
8
+ site_dir : site
9
+
10
+ theme :
11
+ name : material
12
+ palette :
13
+ - media : " (prefers-color-scheme: dark)"
14
+ scheme : slate
15
+ primary : orange
16
+ toggle :
17
+ icon : material/lightbulb-outline
18
+ name : Switch to light mode
19
+ - media : " (prefers-color-scheme: light)"
20
+ scheme : default
21
+ primary : orange
22
+ toggle :
23
+ icon : material/lightbulb
24
+ name : Switch to dark mode
25
+ logo : assets/logo.png
26
+ favicon : assets/logo.png
27
+ icon :
28
+ repo : fontawesome/brands/github
29
+ code : fontawesome/solid/code
30
+ features :
31
+ - navigation.tracking
32
+ - navigation.instant
33
+ - navigation.instant.prefetch
34
+ - content.code.copy
35
+
36
+ plugins :
37
+ - awesome-pages :
38
+ collapse_single_pages : true
39
+ - section-index
40
+ - autorefs
41
+ - mkdocstrings :
42
+ handlers :
43
+ python :
44
+ paths :
45
+ - pyhtml
46
+ options :
47
+ show_source : false
48
+ show_signature_annotations : true
49
+ separate_signature : true
50
+ members_order : source
51
+ show_root_heading : true
52
+ - search
53
+
54
+ # # Not using mkdocs scripts since we need to do a ton of pre-build stuff
55
+ # # Maybe I'll try and get this working some point
56
+ # - gen-files:
57
+ # scripts:
58
+ # - scripts/generate_pages.py
59
+
60
+ markdown_extensions :
61
+ - toc :
62
+ title : Contents
63
+ toc_depth : 2
64
+ - admonition
65
+ - pymdownx.details
66
+ - pymdownx.highlight :
67
+ anchor_linenums : true
68
+ line_spans : __span
69
+ pygments_lang_class : true
70
+ - pymdownx.inlinehilite
71
+ - pymdownx.snippets
72
+ - pymdownx.superfences
73
+
74
+ extra_css :
75
+ - stylesheets/extra.css
76
+
77
+ docs_dir : docs
You can’t perform that action at this time.
0 commit comments