{"id":20541051,"url":"https://github.com/netways/training-global","last_synced_at":"2025-04-14T08:39:14.593Z","repository":{"id":101586432,"uuid":"140538364","full_name":"NETWAYS/training-global","owner":"NETWAYS","description":"NETWAYS Training Global Templates","archived":false,"fork":false,"pushed_at":"2024-09-16T10:28:20.000Z","size":47456,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-27T22:11:31.296Z","etag":null,"topics":["training"],"latest_commit_sha":null,"homepage":"https://www.netways.de/trainings/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NETWAYS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-11T07:31:05.000Z","updated_at":"2024-09-16T10:28:16.000Z","dependencies_parsed_at":"2023-06-06T04:30:14.079Z","dependency_job_id":"67602876-f956-4d2d-9106-07d1065d97ae","html_url":"https://github.com/NETWAYS/training-global","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Ftraining-global","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Ftraining-global/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Ftraining-global/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Ftraining-global/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NETWAYS","download_url":"https://codeload.github.com/NETWAYS/training-global/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248848102,"owners_count":21171303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["training"],"created_at":"2024-11-16T01:19:04.156Z","updated_at":"2025-04-14T08:39:14.571Z","avatar_url":"https://github.com/NETWAYS.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NETWAYS Training global artifacts\n\nThis repository holds global artifacts for a specific NETWAYS training. For example, layouts, templates and images\nresides here.\n\n## How to use\n\n### 1. Add global resource directory to your project\n\nThe global resource dir is introduced by using git subtree mechanism. This keeps the training repository clear from\nspecial git instructions and let users easily clone and use the repository. In addition, the external code (global) can\nbe patched locally if needed and pinned to a specific version.\n\n#### Add a new remote to git\n```bash\n$ git remote add global https://github.com/NETWAYS/training-global.git\n$ git fetch global\nremote: Counting objects: 157, done.\nremote: Compressing objects: 100% (122/122), done.\nremote: Total 157 (delta 24), reused 154 (delta 21), pack-reused 0\nReceiving objects: 100% (157/157), 27.82 MiB | 913.00 KiB/s, done.\nResolving deltas: 100% (24/24), done.\nFrom https://github.com/NETWAYS/training-global\n * [new branch]      master     -\u003e global/master\n```\n\n#### Create a new subtree named global\n```bash\n$ git subtree add --squash --prefix=global/ global master\ngit fetch global master\nFrom https://github.com/NETWAYS/training-global\n * branch            master     -\u003e FETCH_HEAD\nAdded dir 'global'\n```\n\n### 2. Create a directory to provide trainer introduction\n\nThis is probably easy but we want to achieve that changes in this directory does not influence the source code from our\ntraining.\n\n```bash\n$ mkdir trainer\n$ touch trainer/.keep\n$ echo 'trainer/' \u003e\u003e .gitignore\n$ git add -f trainer/ # Force add to git because it is in .gitignore\n$ git commit -m \"Add directory for trainer introduction\"\n```\n\nAfter this step you are able to copy files into the directory which are not captured by the git commit staging process.\n\n### 3. Link stylesheet to root level\n\n```bash\n$ ln -s global/layouts/netways.css\n```\n\nThis step seems ugly and we totally agree with you. In order to print and convert the training slides into pdf, this\nstep is absolutely needed to succeed.  \n\n### 4. Create a showoff.json stub file\n\n```json\n{ \n  \"name\": \"My awesome training\",\n  \"subtitle\": \"Train awesome stuff\",\n  \"author\": \"Colt Seavers \u0026 Howie Munson\",\n  \"release\": \"0.9.0\",\n\n  \"favicon\": \"global/favicon.ico\",\n\n  \"protected\": [\"presenter\", \"onepage\", \"print\"],\n\n  \"user\": \"netways\",\n  \"password\": \"awesome\",\n\n  \"templates\" : {\n    \"default\": \"global/layouts/netways.tpl\"\n  },\n\n  \"sections\": [\n   {\"section\": \"global/pre/netways/title\"},\n   {\"section\": \"global/pre/toc\"},\n   {\"section\": \"trainer\"},\n   {\"section\": \"global/pre/netways/about\"},\n   {\"section\": \"global/pre/hints\"},\n\n   {\"section\": \"sections/...\"},\n\n   {\"section\": \"global/post\"}\n  ]\n}\n```\n\nAfter the file is created you're able to start the slide deck (showoff):\n\n```bash\n$ showoff serve\n```\n\n## Update global directory from GitHub\n\n```bash\n$ git fetch global\n$ git subtree pull --squash --prefix=global/ global master\n```\n\nPlease make sure that no changed files present or staged commits pending.\n\n## Using a Containers to build and serve the slide deck\n\n### Building the Image\n\n```bash\nmake image\nmake image RUNTIME=podman\n```\n\n### Run showoff\n\n```bash\ndocker run -it --rm -v \"$PWD:/training\" -p \"9090:9090\" netways/showoff:0.20.4\n```\n\n### Build static html files\n\n```bash\ndocker run -it --rm -v \"$PWD:/training\" netways/showoff:0.20.4 \\\n  showoff static print\n```\n\n### Create PDF from static html files\n\n```bash\ndocker run -it --rm -v \"$PWD:/training\" \\\n  netways/showoff:0.20.4 \\\n  wkhtmltopdf -s A5 --print-media-type \\\n  --footer-left \\[page\\] --footer-right '© NETWAYS' \\\n  static/index.html test.pdf\n```\n\n### NETWAYS Training Wizard\n\nAlternatively you can simply run the NETWAYS training wizard:\n\n```\n$ ./global/wizard.sh\n###########################\n  NETWAYS Training Wizard  \n###########################\n\n### LAYOUT ###\n\n  [1] NETWAYS\n  [2] OSMC\n  [3] OSDC\n  [4] OSBConf\n\nWhich Layout? [1-4] (Default: 1): \n\n### MODE ###\n\n [1] serve\n [2] print\n\nWhich mode? [1-2] (Default: 1): 2\n\n### PRINT ###\n\n   [1] Handouts\n   [2] Handouts \u0026 Solutions\n   [3] Handouts \u0026 Exercises \u0026 Solutions\n   [4] Exercises \u0026 Solutions\n\nWhat to print? [1-4] (Default: 2): 1\nWhich version? (Default: 0.0.1):\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetways%2Ftraining-global","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetways%2Ftraining-global","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetways%2Ftraining-global/lists"}