mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 10:13:32 -04:00 
			
		
		
		
	documentation updates
This commit is contained in:
		| @@ -1,4 +1,4 @@ | |||||||
| FROM node:alpine as build-stage | FROM node:lts-alpine as build-stage | ||||||
| WORKDIR /app | WORKDIR /app | ||||||
| COPY ./frontend/package*.json ./ | COPY ./frontend/package*.json ./ | ||||||
| RUN npm install | RUN npm install | ||||||
| @@ -18,9 +18,9 @@ WORKDIR /app | |||||||
| RUN pip install -r requirements.txt | RUN pip install -r requirements.txt | ||||||
|  |  | ||||||
| COPY ./mealie /app | COPY ./mealie /app | ||||||
| COPY ./mealie/data/templates/recipes.md /app/data/templates/ | COPY ./mealie/data/templates/recipes.md /app/data/templates/recipes.md | ||||||
| COPY --from=build-stage /app/dist /app/dist | COPY --from=build-stage /app/dist /app/dist | ||||||
| RUN rm -rf /app/test | RUN rm -rf /app/test /app/temp | ||||||
|  |  | ||||||
| ENV ENV prod | ENV ENV prod | ||||||
|  |  | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ | |||||||
|     · |     · | ||||||
|     <a href="https://github.com/hay-kot/mealie/issues">Report Bug</a>     |     <a href="https://github.com/hay-kot/mealie/issues">Report Bug</a>     | ||||||
|     · |     · | ||||||
|     <a href="/api/docs">API</a> |     <a href="https://hay-kot.github.io/mealie/api/docs/">API</a> | ||||||
|     · |     · | ||||||
|     <a href="https://github.com/hay-kot/mealie/issues"> |     <a href="https://github.com/hay-kot/mealie/issues"> | ||||||
|     Request Feature |     Request Feature | ||||||
|   | |||||||
| @@ -1,5 +0,0 @@ | |||||||
| # API Examples |  | ||||||
|  |  | ||||||
| TODO |  | ||||||
|  |  | ||||||
| Have Ideas? Submit a PR! |  | ||||||
							
								
								
									
										14
									
								
								docs/docs/api/api-usage.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								docs/docs/api/api-usage.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | |||||||
|  | # Usage | ||||||
|  |  | ||||||
|  | ## Key Components | ||||||
|  | ### Recipe Extras | ||||||
|  | Recipes extras are a key feature of the Mealie API. They allow you to create custom json key/value pairs within a recipe to reference from 3rd part applications. You can use these keys to contain information to trigger automation or custom messages to relay to your desired device.  | ||||||
|  |  | ||||||
|  | For example you could add `{"message": "Remember to thaw the chicken"}` to a recipe and use the webhooks built into mealie to send that message payload to a destination to be processed. | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ## Examples | ||||||
|  |  | ||||||
|  | Have Ideas? Submit a PR! | ||||||
| @@ -1,5 +1,26 @@ | |||||||
| # Release Notes | # Release Notes | ||||||
|  |  | ||||||
|  | ## v0.0.2 - Pre-release Second Patch | ||||||
|  | A quality update with major props to [zackbcom](https://github.com/zackbcom) for working hard on making the theming just that much better! | ||||||
|  | ### Bug Fixes | ||||||
|  |   - Fixed opacity issues with marked steps - [mtoohey31](https://github.com/mtoohey31) | ||||||
|  |   - Fixed hot-reloading development environment - [grssmnn](https://github.com/grssmnn) | ||||||
|  |   - Fixed recipe not saving without image | ||||||
|  |   - Fixed parsing error on image property null | ||||||
|  |  | ||||||
|  | ### General Improvements | ||||||
|  |   - Added Confirmation component to deleting recipes - [zackbcom](https://github.com/zackbcom) | ||||||
|  |   - Updated Theme backend - [zackbcom](https://github.com/zackbcom) | ||||||
|  |   - Added Persistent storage to vuex - [zackbcom](https://github.com/zackbcom) | ||||||
|  |   - General Color/Theme Improvements | ||||||
|  |       - More consistent UI | ||||||
|  |       - More minimalist coloring | ||||||
|  |   - Added API key extras to Recipe Data - [See Documentation](/api/api-usage/) | ||||||
|  |       - Users can now add custom json key/value pairs to all recipes via the editor for access in 3rd part applications. For example users can add a "message" field in the extras that can be accessed on API calls to play a message over google home.  | ||||||
|  |   - Improved image rendering (nearly x2 speed) | ||||||
|  |   - Improved documentation + API Documentation | ||||||
|  |   - Improved recipe parsing | ||||||
|  |  | ||||||
| ## v0.0.1 - Pre-release Patch | ## v0.0.1 - Pre-release Patch | ||||||
| ### General | ### General | ||||||
|   - Updated Favicon |   - Updated Favicon | ||||||
|   | |||||||
							
								
								
									
										
											BIN
										
									
								
								docs/docs/gifs/api-extras.gif
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/docs/gifs/api-extras.gif
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 14 MiB | 
| @@ -10,7 +10,7 @@ | |||||||
|     · |     · | ||||||
|     <a href="https://github.com/hay-kot/mealie/issues">Report Bug</a>     |     <a href="https://github.com/hay-kot/mealie/issues">Report Bug</a>     | ||||||
|     · |     · | ||||||
|     <a href="/api/docs">API</a> |     <a href="https://hay-kot.github.io/mealie/api/docs/">API</a> | ||||||
|     · |     · | ||||||
|     <a href="https://github.com/hay-kot/mealie/issues"> |     <a href="https://github.com/hay-kot/mealie/issues"> | ||||||
|     Request Feature |     Request Feature | ||||||
|   | |||||||
| @@ -28,7 +28,6 @@ Feature placement is not set in stone. This is much more of a guideline than any | |||||||
|     * [ ] Basic Form Validation |     * [ ] Basic Form Validation | ||||||
| - [ ] Recipe Viewer | - [ ] Recipe Viewer | ||||||
|     * [ ] Print Page View - Like King Arthur Website |     * [ ] Print Page View - Like King Arthur Website | ||||||
|     * [ ] Notes Hidden/Not Hidden |  | ||||||
|     * [ ] Total Time Indicator |     * [ ] Total Time Indicator | ||||||
|     * [ ] Bake Time |     * [ ] Bake Time | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,12 +1,12 @@ | |||||||
| site_name: Mealie Docs | site_name: Mealie Docs | ||||||
|  |  | ||||||
| theme: | theme: | ||||||
|  |   features: | ||||||
|  |     - navigation.expand | ||||||
|   favicon: img/favicon.png |   favicon: img/favicon.png | ||||||
|   name: material |   name: material | ||||||
|   icon: |   icon: | ||||||
|     logo: material/silverware-variant |     logo: material/silverware-variant | ||||||
|   features: |  | ||||||
|     - navigation.expand |  | ||||||
|  |  | ||||||
| markdown_extensions: | markdown_extensions: | ||||||
|   - pymdownx.emoji: |   - pymdownx.emoji: | ||||||
| @@ -34,8 +34,8 @@ nav: | |||||||
|       - Backups and Exports: "getting-started/backups-and-exports.md" |       - Backups and Exports: "getting-started/backups-and-exports.md" | ||||||
|       - Recipe Migration: "getting-started/migration-imports.md" |       - Recipe Migration: "getting-started/migration-imports.md" | ||||||
|   - API Reference: |   - API Reference: | ||||||
|  |       - API Usage: "api/api-usage.md" | ||||||
|       - API Documentation: "api/docs/index.html" |       - API Documentation: "api/docs/index.html" | ||||||
|       - Usage Examples: "api/api-examples.md" |  | ||||||
|   - Contributors Guide: |   - Contributors Guide: | ||||||
|       - Non-Code: "contributors/non-coders.md" |       - Non-Code: "contributors/non-coders.md" | ||||||
|       - Developers Guide: |       - Developers Guide: | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| <template> | <template> | ||||||
|   <v-container fill-height> |   <v-container fill-height> | ||||||
|     <v-row justify="center" align="center"> |     <v-row> | ||||||
|       <v-col sm="12"> |       <v-col sm="12"> | ||||||
|         <v-card |         <v-card | ||||||
|           v-for="(meal, index) in mealPlan.meals" |           v-for="(meal, index) in mealPlan.meals" | ||||||
| @@ -9,21 +9,27 @@ | |||||||
|         > |         > | ||||||
|           <v-row dense no-gutters align="center" justify="center"> |           <v-row dense no-gutters align="center" justify="center"> | ||||||
|             <v-col order="1" md="6" sm="12"> |             <v-col order="1" md="6" sm="12"> | ||||||
|               <v-card flat> |               <v-card | ||||||
|                 <v-card-title> {{ meal.name }} </v-card-title> |                 flat | ||||||
|  |                 class="align-center justify-center" | ||||||
|  |                 align="center" | ||||||
|  |                 justify="center" | ||||||
|  |               > | ||||||
|  |                 <v-card-title class="justify-center"> | ||||||
|  |                   {{ meal.name }} | ||||||
|  |                 </v-card-title> | ||||||
|                 <v-card-subtitle> {{ meal.dateText }}</v-card-subtitle> |                 <v-card-subtitle> {{ meal.dateText }}</v-card-subtitle> | ||||||
|  |  | ||||||
|                 <v-card-text> {{ meal.description }} </v-card-text> |                 <v-card-text> {{ meal.description }} </v-card-text> | ||||||
|  |  | ||||||
|                 <v-card-actions> |  | ||||||
|                 <v-btn |                 <v-btn | ||||||
|  |                   align="center" | ||||||
|                   color="secondary" |                   color="secondary" | ||||||
|                   text |                   text | ||||||
|                   @click="$router.push(`/recipe/${meal.slug}`)" |                   @click="$router.push(`/recipe/${meal.slug}`)" | ||||||
|                 > |                 > | ||||||
|                   View Recipe |                   View Recipe | ||||||
|                 </v-btn> |                 </v-btn> | ||||||
|                 </v-card-actions> |  | ||||||
|               </v-card> |               </v-card> | ||||||
|             </v-col> |             </v-col> | ||||||
|             <v-col order-sm="0" :order-md="getOrder(index)" md="6" sm="12"> |             <v-col order-sm="0" :order-md="getOrder(index)" md="6" sm="12"> | ||||||
|   | |||||||
| @@ -2,7 +2,11 @@ | |||||||
|   <v-container> |   <v-container> | ||||||
|     <v-alert v-if="newVersion" color="green" type="success" outlined> |     <v-alert v-if="newVersion" color="green" type="success" outlined> | ||||||
|       A New Version of Mealie is Avaiable, |       A New Version of Mealie is Avaiable, | ||||||
|       <a href="https://github.com/hay-kot/mealie" class="green--text"> |       <a | ||||||
|  |         href="https://github.com/hay-kot/mealie/releases/latest" | ||||||
|  |         target="_blank" | ||||||
|  |         class="green--text" | ||||||
|  |       > | ||||||
|         Visit the Repo |         Visit the Repo | ||||||
|       </a> |       </a> | ||||||
|     </v-alert> |     </v-alert> | ||||||
| @@ -43,7 +47,7 @@ export default { | |||||||
|   data() { |   data() { | ||||||
|     return { |     return { | ||||||
|       latestVersion: null, |       latestVersion: null, | ||||||
|       version: "v0.0.1", |       version: "v0.0.2", | ||||||
|     }; |     }; | ||||||
|   }, |   }, | ||||||
|   mounted() { |   mounted() { | ||||||
|   | |||||||
| @@ -28,6 +28,17 @@ def auto_backup_job(): | |||||||
|     logger.info("Auto Backup Called") |     logger.info("Auto Backup Called") | ||||||
|  |  | ||||||
|  |  | ||||||
|  | def import_migration(recipe_dict: dict) -> dict: | ||||||
|  |     del recipe_dict["_id"] | ||||||
|  |     del recipe_dict["dateAdded"] | ||||||
|  |  | ||||||
|  |     # Migration from list to Object Type Data | ||||||
|  |     if type(recipe_dict["extras"]) == list: | ||||||
|  |         recipe_dict["extras"] = {} | ||||||
|  |  | ||||||
|  |     return recipe_dict | ||||||
|  |  | ||||||
|  |  | ||||||
| def import_from_archive(file_name: str) -> list: | def import_from_archive(file_name: str) -> list: | ||||||
|     successful_imports = [] |     successful_imports = [] | ||||||
|  |  | ||||||
| @@ -40,16 +51,13 @@ def import_from_archive(file_name: str) -> list: | |||||||
|     for recipe in recipe_dir.glob("*.json"): |     for recipe in recipe_dir.glob("*.json"): | ||||||
|         with open(recipe, "r") as f: |         with open(recipe, "r") as f: | ||||||
|             recipe_dict = json.loads(f.read()) |             recipe_dict = json.loads(f.read()) | ||||||
|             del recipe_dict["_id"] |             recipe_dict = import_migration(recipe_dict) | ||||||
|             del recipe_dict["dateAdded"] |  | ||||||
|  |  | ||||||
|             recipeDoc = RecipeDocument(**recipe_dict) |             recipeDoc = RecipeDocument(**recipe_dict) | ||||||
|             try: |  | ||||||
|             recipeDoc.save() |             recipeDoc.save() | ||||||
|             successful_imports.append(recipe.stem) |             successful_imports.append(recipe.stem) | ||||||
|  |  | ||||||
|             except: |             # print("Failed Import:", recipe.stem) | ||||||
|                 print("Failed Import:", recipe.stem) |  | ||||||
|  |  | ||||||
|     image_dir = TEMP_DIR.joinpath("images") |     image_dir = TEMP_DIR.joinpath("images") | ||||||
|     for image in image_dir.iterdir(): |     for image in image_dir.iterdir(): | ||||||
| @@ -92,7 +100,6 @@ def export_db(tag=None, templates=None): | |||||||
|     return str(zip_path.absolute()) + ".zip" |     return str(zip_path.absolute()) + ".zip" | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| def export_images(dest_dir) -> Path: | def export_images(dest_dir) -> Path: | ||||||
|     for file in IMG_DIR.iterdir(): |     for file in IMG_DIR.iterdir(): | ||||||
|         shutil.copy(file, dest_dir.joinpath(file.name)) |         shutil.copy(file, dest_dir.joinpath(file.name)) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user