Skip to content

Commit e8d1b5d

Browse files
refactor: change AP_MOLAB_BADGE to 0 by default
1 parent e6213e2 commit e8d1b5d

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
AP_AUTO_SYNC=0 # if = 1, Auto-sync pyproject.toml+afterpython.toml-> authors.yml+myst.yml files
2-
AP_MOLAB_BADGE=1 # if = 1, Auto-add molab badges to jupyter notebooks
2+
AP_MOLAB_BADGE=0 # if = 1, Auto-add molab badges to jupyter notebooks

src/afterpython/builders/jupyter_notebook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def build_jupyter_notebooks():
222222
from afterpython.tools._afterpython import get_default_thumbnail
223223

224224
# Check if molab badge feature is enabled
225-
add_molab_badge = os.getenv("AP_MOLAB_BADGE", "1") == "1"
225+
add_molab_badge = os.getenv("AP_MOLAB_BADGE", "0") == "1"
226226

227227
# Get GitHub URL once if needed for molab badges
228228
github_url = None

src/afterpython/builders/marimo_notebook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def build_marimo_notebook(
130130
if mode == "wasm":
131131
return
132132

133-
add_molab_badge = os.getenv("AP_MOLAB_BADGE", "1") == "1"
133+
add_molab_badge = os.getenv("AP_MOLAB_BADGE", "0") == "1"
134134
if not add_molab_badge:
135135
return
136136

src/afterpython/cli/commands/sync.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def sync():
119119
# nav_bar_per_content_type = [
120120
# item for item in nav_bar if item["title"] != content_type.capitalize() + "s"
121121
# ]
122-
title = project_name + f"'s {content_type.capitalize()}"
122+
project_title = content_type.capitalize()
123+
site_title = project_name + f"'s {content_type.capitalize()}"
123124
data = {
124125
"project": {
125126
# using author ids defined in authors.yml
@@ -132,7 +133,7 @@ def sync():
132133
"url": company_url,
133134
},
134135
"copyright": f"© {company_name or project_name} {datetime.now().year}. All rights reserved.",
135-
"title": "",
136+
"title": project_title,
136137
"description": str(pyproject.description),
137138
"keywords": list(map(str, pyproject.keywords)),
138139
"github": github_url,
@@ -141,7 +142,7 @@ def sync():
141142
else "",
142143
},
143144
"site": {
144-
"title": title,
145+
"title": site_title,
145146
"options": {
146147
"favicon": "../static" + myst_favicon if myst_favicon else "",
147148
"logo": "../static" + website_logo if website_logo else "",

0 commit comments

Comments
 (0)