feat: copy favicon to target dir
This commit is contained in:
parent
a0bdb0de99
commit
1e62e1ca7f
2 changed files with 10 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -14,7 +14,6 @@ dist/
|
||||||
downloads/
|
downloads/
|
||||||
eggs/
|
eggs/
|
||||||
.eggs/
|
.eggs/
|
||||||
lib/
|
|
||||||
lib64/
|
lib64/
|
||||||
parts/
|
parts/
|
||||||
sdist/
|
sdist/
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import glob
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
from termcolor import colored
|
from termcolor import colored
|
||||||
|
@ -16,12 +17,17 @@ def transfer_files(target_dir, source_dir):
|
||||||
|
|
||||||
# Copy images to /static
|
# Copy images to /static
|
||||||
print(colored("INFO Copying static files...", "light_blue"))
|
print(colored("INFO Copying static files...", "light_blue"))
|
||||||
shutil.copytree(
|
shutil.copytree(f"{source_dir}/img", f"{target_dir}/static", dirs_exist_ok=True)
|
||||||
f"{source_dir}/img",
|
|
||||||
f"{target_dir}/static",
|
|
||||||
)
|
|
||||||
print(colored("SUCCESS Static files transferred", "light_green"))
|
print(colored("SUCCESS Static files transferred", "light_green"))
|
||||||
|
|
||||||
|
# Copy favicon
|
||||||
|
[
|
||||||
|
shutil.copy2(f, f"{target_dir}/static")
|
||||||
|
for f in glob.glob(
|
||||||
|
f"{source_dir}/.neuron-generator/templates/favicon/favicon*"
|
||||||
|
)
|
||||||
|
]
|
||||||
|
|
||||||
print(colored("INFO Copying zettels...", "light_blue"))
|
print(colored("INFO Copying zettels...", "light_blue"))
|
||||||
|
|
||||||
# Copy notes
|
# Copy notes
|
||||||
|
|
Loading…
Add table
Reference in a new issue