mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	Documentation integration (#4653)
* Add documentation under docs/ directory * Add CI workflow for mkdocs configuration checking * Add documentation issue template * update pip-tools? * Update .gitignore files * Fix .gitignore rules * Improve release notes page * remove references to old repo
This commit is contained in:
		
							
								
								
									
										29
									
								
								docs/main.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								docs/main.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | ||||
| """Main entry point for the documentation build process""" | ||||
|  | ||||
| import os | ||||
|  | ||||
|  | ||||
| def define_env(env): | ||||
|     """Define custom environment variables for the documentation build process""" | ||||
|  | ||||
|     @env.macro | ||||
|     def listimages(subdir): | ||||
|         """Return a listing of all asset files in the provided subdir""" | ||||
|  | ||||
|         here = os.path.dirname(__file__) | ||||
|  | ||||
|         directory = os.path.join(here, 'docs', 'assets', 'images', subdir) | ||||
|  | ||||
|         assets = [] | ||||
|  | ||||
|         allowed = [ | ||||
|             '.png', | ||||
|             '.jpg', | ||||
|         ] | ||||
|  | ||||
|         for asset in os.listdir(directory): | ||||
|  | ||||
|             if any([asset.endswith(x) for x in allowed]): | ||||
|                 assets.append(os.path.join(subdir, asset)) | ||||
|  | ||||
|         return assets | ||||
		Reference in New Issue
	
	Block a user