Skip to content

Commit 68770ae

Browse files
Merge branch 'main' into add_linkedin_icon
2 parents a78b829 + 23ae21c commit 68770ae

16 files changed

Lines changed: 102 additions & 23 deletions

File tree

.github/workflows/label-check.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
env:
1313
LABELS: ${{ join( github.event.pull_request.labels.*.name, ' ' ) }}
1414

15+
permissions: {}
16+
1517
jobs:
1618
check-type-label:
1719
name: ensure type label

.github/workflows/milestone-merged-prs.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
jobs:
1111
milestone_pr:
1212
name: attach to PR
13+
if: github.event.pull_request.merged == true
14+
permissions:
15+
contents: read
16+
issues: write
17+
pull-requests: read
1318
runs-on: ubuntu-latest
1419
steps:
1520
- uses: scientific-python/attach-next-milestone-action@bc07be829f693829263e57d5e8489f4e57d3d420

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
6+
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
77
hooks:
88
- id: check-added-large-files
99
- id: check-ast
@@ -19,14 +19,14 @@ repos:
1919
- id: trailing-whitespace
2020

2121
- repo: https://github.com/rbubley/mirrors-prettier
22-
rev: bc7af46104f0f5368b95878decf720f9f00c2559 # frozen: v3.4.2
22+
rev: 5ba47274f9b181bce26a5150a725577f3c336011 # frozen: v3.6.2
2323
hooks:
2424
- id: prettier
2525
types_or: [yaml, toml, markdown, css, scss, javascript, json]
2626
args: [--prose-wrap=preserve]
2727

2828
- repo: https://github.com/astral-sh/ruff-pre-commit
29-
rev: 73413df07b4ab0bf103ca1ae73c7cec5c0ace593 # frozen: v0.9.2
29+
rev: 9c89adb347f6b973f4905a4be0051eb2ecf85dea # frozen: v0.13.3
3030
hooks:
3131
- id: ruff
3232
args:
@@ -39,7 +39,7 @@ repos:
3939
- id: ruff-format
4040

4141
- repo: https://github.com/woodruffw/zizmor-pre-commit
42-
rev: 4dcc98ccce605605fd6d5202bf803a8c8bc34e8d # v1.1.1
42+
rev: v1.14.2 # v1.1.1
4343
hooks:
4444
- id: zizmor
4545

assets/theme-css/footer.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@
3939
color: var(--spht-color-link-hover);
4040
}
4141

42+
.footer-item a.nav-external {
43+
white-space: nowrap;
44+
}
45+
46+
.footer-item a.nav-external::after {
47+
font: var(--fa-font-solid);
48+
content: "\f35d";
49+
font-size: 0.75em;
50+
margin-left: 0.3em;
51+
display: inline-block;
52+
}
53+
4254
.footer-actions {
4355
max-width: 25vw;
4456
margin: 1.25rem 1.563rem;

assets/theme-css/navbar.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
nav,
21
.navbar {
32
background: var(--pst-color-background);
43
position: sticky;
@@ -42,6 +41,15 @@ a.navbar-item:hover,
4241
text-decoration-thickness: max(3px, 0.1875rem, 0.12em);
4342
}
4443

44+
a.navbar-item.nav-external::after,
45+
.navbar-dropdown a.navbar-item.nav-external::after {
46+
font: var(--fa-font-solid);
47+
content: "\f35d";
48+
font-size: 0.75em;
49+
margin-left: 0.3em;
50+
display: inline-block;
51+
}
52+
4553
.navbar-burger {
4654
font-family: inherit;
4755
font-size: 1em;

assets/theme-css/pst/components/_breadcrumbs.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/**
22
* Breadcrumbs for parent pages meant for the article header
33
*/
4+
nav[aria-label="Breadcrumb"] {
5+
width: fit-content;
6+
}
7+
48
ul.bd-breadcrumbs {
59
list-style: none;
610
padding-left: 0;

assets/theme-css/pst/variables/_fonts.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@ html {
3333

3434
// Font family
3535
// These are adapted from https://systemfontstack.com/ */
36-
--pst-font-family-base-system: -apple-system, "BlinkMacSystemFont",
37-
"Segoe UI", "Helvetica Neue", "Arial", sans-serif, "Apple Color Emoji",
38-
"Segoe UI Emoji", "Segoe UI Symbol";
39-
--pst-font-family-monospace-system: "SFMono-Regular", "Menlo", "Consolas",
40-
"Monaco", "Liberation Mono", "Lucida Console", monospace;
36+
--pst-font-family-base-system:
37+
-apple-system, "BlinkMacSystemFont", "Segoe UI", "Helvetica Neue", "Arial",
38+
sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
39+
--pst-font-family-monospace-system:
40+
"SFMono-Regular", "Menlo", "Consolas", "Monaco", "Liberation Mono",
41+
"Lucida Console", monospace;
4142
--pst-font-family-base: var(--pst-font-family-base-system);
4243
--pst-font-family-heading: var(--pst-font-family-base-system);
4344
--pst-font-family-monospace: var(--pst-font-family-monospace-system);

doc/config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ params:
4141
url: /shortcodes/
4242
- title: Examples
4343
url: /examples/
44+
- title: Repository
45+
url: https://github.com/scientific-python/scientific-python-hugo-theme
46+
is_external: true
4447
- title: More
4548
sublinks:
4649
- title: Dropdown item
@@ -70,9 +73,11 @@ params:
7073
link: /about/
7174
- text: Theme GitHub
7275
link: https://github.com/scientific-python/scientific-python-hugo-theme
76+
is_external: true
7377
column2:
7478
links:
7579
- text: Scientific Python Forum
7680
link: https://discuss.scientific-python.org
81+
is_external: true
7782
column3:
7883
links:

doc/content/examples/kitchen-sink/tables.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ format:
3838
rows:
3939

4040
- columns:
41-
4241
- "NumPy"
4342
- |
4443
Official _source code_ (all platforms) and _binaries_ for<br/>

doc/content/user_guide/features.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,48 @@ To use them elsewhere, e.g. in Hugo templates, we provide an `svg-icon` partial.
9393
{{ partial "svg-icon" "my-icon" }}
9494
```
9595

96+
## External links
97+
98+
Links in the navbar and footer can be marked as external by adding `is_external: true`. This displays an external link indicator icon
99+
(<span style="font-family: 'Font Awesome 6 Free', FontAwesome;"></span>) next to the link text and opens the link in a new tab.
100+
101+
### Navbar external links
102+
103+
```yaml
104+
params:
105+
navbar:
106+
- title: Documentation
107+
url: /docs/
108+
- title: GitHub
109+
url: https://github.com/your-org/your-repo
110+
is_external: true
111+
- title: More
112+
sublinks:
113+
- title: Internal Page
114+
url: /internal/
115+
- title: External Resource
116+
url: https://example.com
117+
is_external: true
118+
```
119+
120+
### Footer external links
121+
122+
```yaml
123+
params:
124+
footer:
125+
quicklinks:
126+
column1:
127+
title: "Links"
128+
links:
129+
- text: About
130+
link: /about/
131+
- text: GitHub Repository
132+
link: https://github.com/your-org/your-repo
133+
is_external: true
134+
```
135+
136+
The external link indicator automatically adapts to both light and dark colour modes.
137+
96138
## Mermaid diagrams
97139

98140
[Mermaid](https://mermaid.js.org/) diagrams are rendered from code blocks:

0 commit comments

Comments
 (0)