mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 01:48:30 +07:00
15 lines
455 B
Python
15 lines
455 B
Python
import os
|
|
|
|
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
|
|
|
|
|
|
class CustomBuildHook(BuildHookInterface):
|
|
def initialize(self, version, build_data):
|
|
from babel.messages.frontend import compile_catalog
|
|
|
|
for theme in 'mkdocs', 'readthedocs':
|
|
cmd = compile_catalog()
|
|
cmd.directory = os.path.join('mkdocs', 'themes', theme, 'locales')
|
|
cmd.finalize_options()
|
|
cmd.run()
|