|
5 | 5 | "pages": { |
6 | 6 | "HostingMaterialDocsOnGHPagesTutorial": { |
7 | 7 | "headers": { |
8 | | - "hostingOnGH": "Хостинг Material Docs на GitHub Pages", |
9 | | - "projectSetup": "Настройка проекта для GitHub Pages", |
10 | | - "problem": "Проблема", |
11 | | - "solutionTheory": "Решение в теории", |
12 | | - "solutionPractice": "Решение на практике", |
13 | | - "repoCreating": "Создание репозитория", |
14 | | - "compilation": "Компиляция", |
15 | | - "ghPagesSetup": "Настройка GitHub Pages", |
16 | | - "basicSetup": "Базовая настройка", |
17 | | - "ownDomainHooking": "Привязывание собственного домена", |
18 | | - "nextSteps": "Дальнейшие шаги", |
19 | | - "ghSources": "Исходники на GitHub" |
20 | | - }, |
21 | | - "prevTutorial": "Этот туториал использует проект, созданный в", |
22 | | - "prevLesson": "предыдущем уроке", |
23 | | - "overview": "Material Docs - это одно страничное React приложение, которое использует __react-router-dom__. Это означает, что\nпри переключении между страницами _URL_ меняется без перезагрузки страницы. Когда пользователь обращается на сайт, который \nхостится с помощью GitHub Pages, хостинг вернет страницу __index.thml__ или же ту, которая указана в _URL_. ", |
24 | | - "overview2": "Проще говоря, если мы захостим Material Docs на GitHub Pages без дополнительной настройки - при перезагрузке страницы \nбудем получать страницу __404 | Not found__.", |
25 | | - "suggestions": "Для того, чтоб предотвратить данную проблему, предлагается: \n* Создать страницу __404.html__, которая будет помещать путь из _URL_ в __query string__ запроса и делать редирект на \n_URL_, который ведет на __index.html__. \n* На странице __index.html__ мы будем обратно разбирать __query string__ и возвращать все на место __до того, как запустится react__.", |
26 | | - "jekyll": "Создайте файл __.nojekyll__ в директории __public__. Он нужен для того, чтоб GitHub Pages ну использовала фреймворк Jekyll.", |
27 | | - "jekyllNote": "По умолчанию, GitHub Pages использует", |
28 | | - "page404": "Теперь, необходимо добавить в директорию __public__ файл __404.html__ с таким содержанием:", |
29 | | - "segmentCount": "> Переменная ___segmentCount___ указывает количество элементов пути, которые не надо сериализовать. \n> В случае GitHub Pages - необходимо выставить значение ___segmentCount___ = 1. \n> Если вы собираетесь привязать собственный домен - посчитайте ___segmentCount___ и выставьте его.", |
30 | | - "pageIndex": "Далее, добавьте в файл __index.html__ в тэг _head_ следующий код:" |
| 8 | + "hostingOnGH": "Hosting Material Docs on GitHub Pages", |
| 9 | + "projectSetup": "Project setup for GitHub Pages", |
| 10 | + "problem": "The problem", |
| 11 | + "solutionTheory": "Solution in theory", |
| 12 | + "solutionPractice": "Practice solution", |
| 13 | + "repoCreating": "Creating a repository", |
| 14 | + "compilation": "Compilation", |
| 15 | + "ghPagesSetup": "Setting up GitHub Pages", |
| 16 | + "basicSetup": "Basic setup", |
| 17 | + "ownDomainHooking": "Linking your own domain", |
| 18 | + "nextSteps": "Further steps", |
| 19 | + "ghSources": "Sources on GitHub" |
| 20 | + }, |
| 21 | + "prevTutorial": "This tutorial uses a project created in", |
| 22 | + "prevLesson": "previous lesson", |
| 23 | + "overview": "Material Docs - is a single page application that uses __react-router-dom__. It means that when switching between pages, _URL_ changes without reloading the page. When a user visits a site that hosted with GitHub Pages, the hosting will return the __index.thml__ page or the one specified in the _URL_.", |
| 24 | + "overview2": "Simply put, if we host Material Docs on GitHub Pages without additional configuration - on page reload will receive page __404 | Not found__.", |
| 25 | + "suggestions": "In order to prevent this problem, it is proposed:\n* Create a __404.html__ page that will put the path from _URL_ into the __query string__ of the request and redirect to _URL_, which leads to __index.html__.\n* On the __index.html__ page, we will parse the __query string__ back and put everything back in the __ position before react__ starts.", |
| 26 | + "jekyll": "Create a __.nojekyll__ file in the __public__ directory. It is needed in order for GitHub Pages to use the Jekyll framework.", |
| 27 | + "jekyllNote": "By default, GitHub Pages uses", |
| 28 | + "page404": "Now, you need to add the __404.html__ file to the __public__ directory with the following content:", |
| 29 | + "segmentCount": "> The variable ___segmentCount___ indicates the number of path elements that do not need to be serialized.\n> In the case of GitHub Pages, you need to set the value ___segmentCount___ = 1.\n> If you are going to link your own domain, count ___segmentCount___ and set it.", |
| 30 | + "pageIndex": "Next, add the following code to the __index.html__ file in the _head_ tag:", |
| 31 | + "compiling": "Now, all that remains is to compile Material Docs and set up GitHub Pages :)", |
| 32 | + "repoCreation": "Create a repository on _GitHub_ with any name, in our case - ___material-docs-example-project___. After, upload files to it using any software of your choice.", |
| 33 | + "packageSetup": "> In the __package.json__ file, add the _homepage_ field with the URL of the page on GitHub Pages.\n> Example address", |
| 34 | + "building": "In order to place the documentation on GitHub Pages, you need to compile the project. To do this, you must run\ncommand in the directory where the file is located ", |
| 35 | + "for": "For", |
| 36 | + "dirSetup": "Thus, we got an almost ready-to-publish web page in the __build__ directory.\nRename this directory to __docs__.", |
| 37 | + "settings": "Go to the __Settings__ section of your repository and find the __GitHub Pages__ subsection there.", |
| 38 | + "source": "In the __Source__ section, select the target branch, and in the __directory__ field, select ___ /docs___. Save the settings.", |
| 39 | + "hostingSetup": "> For example, we will use the subdomain ___ example.material-docs.com ___\n> _Domain management interface may differ depending on your hosting. In the example, hosting_ __Imena.ua__", |
| 40 | + "hostingSettings": "Go to the domain settings and add an entry:", |
| 41 | + "hostingComment": "> If you are not using a subdomain - instead of _example_, enter ___www___\n> _185.199.111.153 - GitHub Pages address at the time of the tutorial creation ._", |
| 42 | + "hostingSteps": "* Calculate the value of the ___segmentCount___ parameter in the __404.html__ file. ([How to do it] (#solution-in-practice))\n* In the __package.json__ file, set __your domain__ in the _homepage_ field.\n* Add a domain to the GitHub Pages settings in the domain field.", |
| 43 | + "githubExample": "You can find this example on", |
| 44 | + "here": "here" |
31 | 45 | }, |
32 | 46 | "CreatingMaterialDocsTutorial": { |
33 | 47 | "headers": { |
|
36 | 50 | "materialDocsSetup": "Material Docs setup", |
37 | 51 | "indexSetup": "Setting up index.html", |
38 | 52 | "extraFilesDeleting": "Extra files deletion", |
39 | | - "creatingDocs": "Создание документации", |
| 53 | + "creatingDocs": "Documentation creation", |
40 | 54 | "basicStructure": "Basic structure", |
41 | 55 | "creatingPage": "Creating page", |
42 | 56 | "creatingPageComponent": "Creating page component", |
|
0 commit comments