File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed
src/afterpython/cli/commands Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ def determine_base_path() -> str:
3737
3838 # Read website URL from afterpython.toml
3939 afterpython = read_afterpython ()
40- website_url = str (_from_tomlkit (afterpython [ "website" ] ).get ("url" , "" ))
40+ website_url = str (_from_tomlkit (afterpython . get ( "website" , {}) ).get ("url" , "" ))
4141
4242 # If custom domain (no github.io), no BASE_PATH needed
4343 if "github.io" not in website_url :
Original file line number Diff line number Diff line change @@ -66,7 +66,6 @@ def init(ctx, yes):
6666
6767 afterpython_path .mkdir (parents = True , exist_ok = True )
6868 static_path .mkdir (parents = True , exist_ok = True )
69- afterpython_path .joinpath ("afterpython.toml" ).touch ()
7069
7170 init_pyproject ()
7271
Original file line number Diff line number Diff line change @@ -51,9 +51,9 @@ def sync():
5151 project_name = str (pyproject .name )
5252 afterpython = read_afterpython ()
5353 github_url = str (pyproject .urls .get ("repository" , "" ))
54- company_name = str (_from_tomlkit (afterpython [ "company" ] ).get ("name" , "" ))
55- company_url = str (_from_tomlkit (afterpython [ "company" ] ).get ("url" , "" ))
56- website_url = str (_from_tomlkit (afterpython [ "website" ] ).get ("url" , "" ))
54+ company_name = str (_from_tomlkit (afterpython . get ( "company" , {}) ).get ("name" , "" ))
55+ company_url = str (_from_tomlkit (afterpython . get ( "company" , {}) ).get ("url" , "" ))
56+ website_url = str (_from_tomlkit (afterpython . get ( "website" , {}) ).get ("url" , "" ))
5757 authors = pyproject .authors
5858 if company_name and company_url :
5959 nav_bar = [{"title" : company_name , "url" : company_url }]
You can’t perform that action at this time.
0 commit comments