Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Telerik Documentation Infrastructure

License

NotificationsYou must be signed in to change notification settings

telerik/docs-seed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contains the documentation site implementation.

Local Setup

This section describes how to run the documentation locally.

Prerequisites

  • InstallNode.js and restart the machine.
  • Choose a documentation repo to which you want to contribute. For example,https://github.com/telerik/xaml-docs.git.
    Referred to asMY-REPO below.
  • Pull the documentation repo locally. For example,"D:\Work\xaml-docs".
    Referred to asDOCS-PATH below.
  • For products such as Kendo UI for jQuery, UI for ASP.NET MVC, and UI for ASP.NET Core, the documentation is part of the source code repo. For these products,'DOCS-PATH' is a nested folder in the cloned repo, for example,"D:\Work\kendo-ui-core\docs".

Instructions (without Docker)

  1. Install Ruby 2.3.3 (64-bit or32-bit).

SelectAdd Ruby executables to your PATH andAssociate .rb and .rbw files with this Ruby installation during the installation.

  1. Download and extract the Ruby DevKit 4.7.2 (64-bit or32-bit). Note the location of the extracted archive (for example:C:\RubyDevKit).

  2. Install and init the Ruby DevKit. For more information, seehere.

cd C:\RubyDevKitruby dk.rb initruby dk.rb install
  1. Install RubyGems 3.2.29.
gem update --system 3.2.29
  1. Install Bundler 2.3.11.
gem install bundler -v 2.3.11

If you experience SSL errors with Bundler, similar to the one described inRubyGems SSL Certificate Update, follow the solution steps fromBundler.io - Installing new RubyGems certificates.

  1. Clone thedocs-seed repo.
git clone git@github.com:telerik/docs-seed.git
  1. Go to the directory for the pulleddocs-seed repo (for example,D:\Work\docs-seed).
  2. Open your preferred Bash-enabled terminal (for example,gitBash).
  3. Run the following command and pass theDOCS-PATH path (thequotes are mandatory):
sh copy_local.sh"D:\Work\xaml-docs"

If you are running the documentation on a macOS or another OS where therobocopy command is unavailable, pass a second parameter to thecopy_local.sh script:sh copy_local.sh "D:\Work\xaml-docs" true.

  1. In the terminal, navigate to theDOCS-PATH directory.
cd D:\Work\xaml-docs
  1. Install the required dependencies:
bundle install
  1. Run the following command in the root folder of the cloned documentation repo:
bundleexec jekyll serve
  1. In your browser, navigate to the server address shown in the terminal:http://127.0.0.1:4000/.
    For documentation sets nested in the documentation repo, you need to navigate to the respective folder. For example, for the WPF documentation, the correct server address will behttp://127.0.0.1:4000/devtools/wpf/.

If you can't open the URL, replace the127.0.0.1 withlocalhost (http://localhost:4000).

If you want to change the host or port, pass the--host or--port arguments to the command fromStep 12. For example,bundle exec jekyll serve --host=0.0.0.0 --port=1234.

Instructions (with Docker)

CautionAs of November 2023, the support for the docs-seed setup via Docker is limited. SeeInstructions (without Docker) instead.

  1. Ensure that you have installed Docker with the default settings enabled. See theofficial Docker installation guide.

You can use Docker Community Edition (CE).

  1. Clone thedocs-seed repo.
git clone git@github.com:telerik/docs-seed.git
  1. Go to the directory in which you've pulled it (for example,D:\Work\docs-seed).
  2. Open a terminal of your choice (for example,gitBash).
  3. Run the following command by passing theDOCS-PATH path (thequotes are mandatory):
sh copy_local.sh"D:\Work\xaml-docs"

If you are running the documentation on a macOS or another OS where therobocopy command is unavailable, pass a second parameter to thecopy_local.sh script:sh copy_local.sh "D:\Work\xaml-docs" true.

  1. Go to theDOCS-PATH directory.
  2. Open theDockerfile with an editor
  3. Delete the following two rows:
ADD Gemfile ${APP_ROOT}/ADD Gemfile.lock ${APP_ROOT}/
  1. Add the following row:
ENV BUNDLER_VERSION=2.1.4
  1. Delete theGemFile.lock file
  2. Open a terminal of your choice (for example,gitBash).
  3. Execute the following bash command in the root folder (where theDockerfile is located).
sh start-docs.sh
  1. Open the documentation site on the server address shown in the terminal:http://0.0.0.0:4000/. If you can't open the URL, replace the0.0.0.0 withlocalhost:http://localhost:4000. For example, for the WPF documentation, this will behttp://0.0.0.0:4000/devtools/wpf/.
  2. To stop the web site and the container in which it has been served, navigate to the terminal in which you've executed the previous command, and pressCTRL+C. On passing an additionalconfig file for the WPF and Silverlight documentation, refer tothis section.

Troubleshooting

Get More Detailed Error Message

To get more information and a full stack trace of the error, add--trace after yourjekyll command. For example,bundle exec jekyll build --trace.

Does Not Serve

You executedsh start-docs.sh but you did not see any Jekyll output. Instead, the command ended withthe input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'.

This happens when using Git Bash with the MinTTY console. This console does not allow combinations such asCtrl+C to pass to the Docker container and that's why you get such an error.

To solve this issue, prefix the command withwinpty:

winpty sh start-docs.sh

Aa an alternative, re-install Git Bash and choose the default Windows terminal this time. For more details, refer to theDocker for Windows: Interactive Sessions in MinTTY Git Bash post.

Ctrl+C Does Not Work

When you want to stop serving the docs, you may have to repeat theCtrl+C command or pressEnter after it.

.gitignore Is always Modified

The scripts that copy the seed repo to the content repo (MY-REPO) also update the.gitignore file to avoid creating unstaged changes together with the work files that must not be committed. If you keep getting the.gitignore checked out, identify the changes as compared to the original and commit the version that matches what the tool generates to your repo.

Performance

Docker is a resource-intensive tool. If you are not using it on a daily basis, consider preventing it from running on startup. Right-click itsTray icon and navigate toSettings >General. UncheckStart Docker when you log in. This can save you time when booting up/logging in, but you will need to explicitly start Docker before working on any docs-seed documentation.

Also, it tends to require a lot of HDD space, which may be an issue if you are running it on an SSD drive with a limited capacity. You can reduce its quota by navigating to theSettings dialog >Advanced and either change the image location, and/or reduce its max size. This also lets you limit its RAM consumption.

Encoding Problems while Building

When you try to build the documentation site, you may see an error including the followingincomplete "\n" on UTF-16LE message. It might be caused because of different things. Use the following steps to try to fix or workaround it:

  1. EnsureNode.js is installed by typingnode -v in a command prompt. The machine must be restarted after aNode.js installation.
  2. Allowfiles with long paths using the following command:
git config --system core.longpathstrue
  1. Add the followingSystem Environment Variables
  • JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
  • LANG: en_GB.UTF-8
  1. Modify theruntimes.rb file in theexecJs gem by changing theUTF-16LE with theUTF-8 value. For details,see the instructions here orhere. Theruntimes.rb file is located in[Ruby Installation folder]\lib\ruby\gems\2.3.0\gems\execjs-2.7.0\lib\execjs.

Known Error Messages

  • jekyll 3.3.1 | Error: [prev_next plugin] Comparing the pages notes.md and sitemap.xml failed

    • Usually happens when a new article does not haveposition property in the front-matter. To solve this issue, add a number to theposition property. If you want some articles to sort alphabetically, they need to have the sameposition value.
    • It might also happen if a folder or a file is magically added to the docs repo folder. To solve this issue, clean the folder and make a fresh clone of the docs repo.
  • jekyll 3.3.1 | Error: 404 Not Found—This is often observed when you create a new documentations and when no entry for the product in the Top Navigation list exists. To solve this issue, add an entry for your documentation as in thefeat: add MAUI to top navigation commit for the/_plugins/top_navigation.rb file. If the Telerik Web Team do not have the Top Navigation ready yet, you can temporarily reuse the top navigation value property from another product to make the build successful.

Extra Features

You might find the following features useful:

Additional Config File

To add an additionalconfig.yml file, pass it to the above command as follows:

sh start-docs.sh _silverlight.yml

LiveSync

To monitor the changes you are making on the built documentation, execute the following command in a new terminal in the root directory of the site:

sh watch.sh

You need to haveNode.js installed.

Only Build

To only runjekyll build and notjekyll serve, execute the following bash command:

sh build-docs.sh

This can be useful if you want to (or already have) set up a local IIS to point to the_site folder in your documentation repo. This allows you to also test redirects thatjekyll serve does not support.

Build Site Partially

To speed up the building time of the web site, you can passonly specific parts of it—the folders you want to include in the site.

To achieve this, execute thesh modify-config.sh script with passing the corresponding arguments which are:

  • -i,--include—The folders you want to include in the final build. Multiple folders are separated with a comma. No spaces are allowed.
  • -c,--config—The path to an additional config file which will be used for the build (more aboutadditional config file).
  • -s,--serve—Acceptstrue/false. Indicates whether the Jekyll will only build or build and serve.
  • -d,--docker—Acceptstrue/false. Indicates whether the site will run in Docker (set--docker=true if you're using Docker).

For example, if you want to build only the documentation for two controls, the Barcode and the Chart, you are using Docker, and you have an extra config YAML file. Then you have to open a terminal and execute the following command:

sh modify-config.sh --include=controls/barcode,controls/Chart --docker=true --config=_extra.yml

Exclude Articles from Navigation Tree

If you have some obsolete articles or whole folders that you need to hide from the navigation tree, use theexclude_navigation array in the settings of theconfig.yml file in your repository. The example below shows how to exclude listing all articles inknowledge-base folder as well assharepoint folder.

For example, fromhttps://github.com/telerik/ajax-docs/blob/master/_config.yml#L6,exclude_navigation: ["sharepoint/2007/*" ,"knowledge-base/*"]

Webinar Banner

Moved in wiki under theAnnouncements banner article.

Build API Reference

ADocFX-based infrastructure generates the API reference portion of the site for you. To use it, you need the following:

  • The docs-seed repo on your build machine.

  • An API ref link in your table of contents on the left. To enable it, add the following line in your_config.yml file:

    _config.yml

      `api_reference_url: "api/"`
  • A folder on a shared network location that the build can access, and that contains the.dll and.xml files you want generated.

  • The assets for building the API reference in your repo. You can start by copying existing assets, for example,from WinForms. Note that the templates are plain HTML for the time being, so you must keep them in sync with your repo code manually: update the footer template with the generated HTML of your own docs, make sure the search template can reach the scripts it needs (can be an issue if you have cache busting enabled in your own repo). Also, update theindex.md file to have the contents suitable for your case. Keep them updated if you change your own repo as well.

  • AnMSBuild step in your content repo builds that will take the binaries, XML files and content repo, build the HTML files for the API ref, and copy them to the_site/api folder in your content repo.

    This build is executed through the_buildApi/BuildApiReference.proj file. For example, in the VS command prompt:msbuild.exe BuildApiReference.proj /p:LatestBinariesPath=\\\\someNetworkServer\MySourceFiles;DocsRepoName=blazor-docs;DocumentationBaseUrl=https://docs.telerik.com/blazor-ui;DocsRepoApiAssetsFolder=_assetsApi;HasApiFilter=true.

    note Depending on the machine culture, you might need to use a comma, instead of a semi-colon; otherwise you will get aDocsRepoName is not defined error (CheckRequiredProperties target) -> D:\DocsSeed\_buildApi\BuildApiReference.proj(26,5): error : DocsRepoName is not defined (Ex. winforms-docs)

    Here is a list of the build parameters and their purpose:

    • LatestBinariesPath—The path to where you have the.dll+.xml pairs of code you want documented. The format is usually resembles\\\\someNetworkServer\MySourceFiles orC:\work\myFolder. The escaping of the backslashes is an example for using this as a build parameter.

    • DocsRepoName—The name of the repo with your contents. By default, the build expects that the docs-seed repo and the content repo are located in adjacent folders. So, for example, pass onlyblazor-docs orwinforms-docs, orteststudio/docs (when the docs are nested further down in a folder inside your repo).

    • DocumentationBaseUrl—The base URL of your docs when on the live server. Used for thesitemap.xml file. For example,https://docs.telerik.com/blazor-ui/.

    • DocsRepoApiAssetsFolder—This is the location for the build assets specific to your repo (at the time of writing, search, footer templates, feedback form, plus some styles). If you copy from an existing repo, this is always_assetsApi.

    • HasApiFilter—Anoptional parameter in case you want to avoid generating API reference docs for some classes or their members. See theDocFX docs on the matter for syntax and examples. To use this filter, you must add a file in your repo with the desired filter contents, and put it in<DocsRepoApiAssetsFolder>\filterConfig.yml. The file is always at the root of the API assets folder, and is always calledfilterConfig.yml. Here's what DocFX generates at the time of writing (10 Jul 2019, DocFX version 2.40.5):

      C#

      //GENERATEDpublic string publicTest;protected string protectedTest;protected internal string protectedInternalTest;//NOT GENERATEDprivate string privateTest;internal string internalTest;private protected string privateProtectedTest;

Documentation Best Practices

If you need to create new documentation (for example, for a new product), usedocs-content-seed repository as an auxiliary part to this one.

For best practices and industry standards on creating and maintaining documentation, go to the publicProgress DevTools Style Guide.

docs-seed Syntax Guidelines

To ensure the syntax you use when you add or edit the documentation will properly render the content, read thesyntax guidelines in the docs-seed Wiki.


[8]ページ先頭

©2009-2025 Movatter.jp