diff --git a/app/controllers/docs_controller.rb b/app/controllers/docs_controller.rb deleted file mode 100644 index 9ce7e71..0000000 --- a/app/controllers/docs_controller.rb +++ /dev/null @@ -1,10 +0,0 @@ -class DocsController < ApplicationController - layout 'docs' - - rescue_from ActionView::MissingTemplate, with: :handle_not_found - - def show - @current_category = params[:page].to_sym - render params[:page] - end -end diff --git a/app/helpers/docs_helper.rb b/app/helpers/docs_helper.rb deleted file mode 100644 index 611f68b..0000000 --- a/app/helpers/docs_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module DocsHelper -end diff --git a/app/views/asciicasts/_share.html.slim b/app/views/asciicasts/_share.html.slim index faf6837..6e9495c 100644 --- a/app/views/asciicasts/_share.html.slim +++ b/app/views/asciicasts/_share.html.slim @@ -46,4 +46,4 @@ p Paste the above script tag where you want the player to be displayed on your page. hr - p See #{link_to 'Sharing & embedding', docs_path(:embedding)} for additional options. + p See #{link_to 'Sharing & embedding', '/docs/embedding'} for additional options. diff --git a/app/views/docs/_docs_topics.html.slim b/app/views/docs/_docs_topics.html.slim deleted file mode 100644 index 0be2ec5..0000000 --- a/app/views/docs/_docs_topics.html.slim +++ /dev/null @@ -1,10 +0,0 @@ -h2 Docs - -= category_links current_category do |categories| - = categories.link_to 'How it works', docs_path('how-it-works'), :'how-it-works' - = categories.link_to 'Getting started', docs_path('getting-started'), :'getting-started' - = categories.link_to 'Installation', docs_path(:installation), :installation - = categories.link_to 'Usage', docs_path(:usage), :usage - = categories.link_to 'Configuration file', docs_path(:config), :config - = categories.link_to 'Sharing & embedding', docs_path(:embedding), :embedding - = categories.link_to 'FAQ', docs_path(:faq), :faq diff --git a/app/views/docs/_quick_install.html.md b/app/views/docs/_quick_install.html.md index 8044937..b169e1b 100644 --- a/app/views/docs/_quick_install.html.md +++ b/app/views/docs/_quick_install.html.md @@ -2,4 +2,4 @@ Install asciinema with: <%= render partial: "docs/install_homebrew" %> -See other <%= link_to('installation options', docs_path(:installation)) %>. +See other <%= link_to('installation options', '/docs/installation') %>. diff --git a/app/views/docs/config.html.md b/app/views/docs/config.html.md deleted file mode 100644 index 9499f5b..0000000 --- a/app/views/docs/config.html.md +++ /dev/null @@ -1,52 +0,0 @@ -<% content_for(:title, 'Configuration file') %> - -# Configuration file - -asciinema uses a config file to keep API token and user settings. In most cases -the location of this file is `$HOME/.config/asciinema/config`. - -*NOTE! When you first run `asciinema`, local API token is generated (UUID) and -saved in the file (unless the file already exists).* - -The auto-generated, minimal config file looks like this: - - [api] - token = - -There are several options you can set in this file. Here's a config with all -available options set: - - [api] - token = - url = https://asciinema.example.com - - [record] - command = /bin/bash -l - maxwait = 2 - yes = true - quiet = true - - [play] - maxwait = 1 - -The options in `[api]` section are related to API location and authentication. -To tell asciinema recorder to use your own asciinema site instance rather than -the default one (asciinema.org), you can set `url` option. API URL can also be -passed via `ASCIINEMA_API_URL` environment variable. - -The options in `[record]` and `[play]` sections have the same meaning as the -options you pass to `asciinema rec`/`asciinema play` command (see [Usage](<%= docs_path(:usage) %>)). If you happen to -often use either `-c`, `-w` or `-y` with these commands then consider saving it -as a default in the config file. - -## Configuration file locations - -In fact, the following locations are checked for the presence of the config -file (in the given order): - -* `$ASCIINEMA_CONFIG_HOME/config` - if you have set `$ASCIINEMA_CONFIG_HOME` -* `$XDG_CONFIG_HOME/asciinema/config` - on Linux, `$XDG_CONFIG_HOME` usually points to `$HOME/.config/` -* `$HOME/.config/asciinema/config` - in most cases it's here -* `$HOME/.asciinema/config` - created by asciinema versions prior to 1.1 - -The first found is used. diff --git a/app/views/docs/embedding.html.md b/app/views/docs/embedding.html.md deleted file mode 100644 index 615ff8b..0000000 --- a/app/views/docs/embedding.html.md +++ /dev/null @@ -1,159 +0,0 @@ -<% content_for(:title, 'Sharing & embedding') %> - -# Sharing & embedding - -You can share any recording by copying its URL and sending it to a friend or -posting it on a social network. asciinema.org supports oEmbed/Open Graph/Twitter -Card protocols, displaying a nice thumbnail where possible. - -You can also easily embedded an asciicast on any HTML page. If you want to put a -recording in a blog post, project's documentation or in a conference talk -slides, you can do it by copy-pasting one of the the embed scripts. - -## Sharing a link - -You can get the share link for a specific asciicast by clicking on "Share" link -on asciicast page. - -Any of the options listed in "Customizing the playback" section below can be -appended to the asciicast URL as the query params, e.g.: - - https://asciinema.org/a/14?t=25&speed=2&theme=solarized-dark - -Visiting this link will start the playback at 25s and play at double speed, -using Solarized Dark terminal theme. - -## Embedding image link - -Embedding as an image link is useful in places where scripts are not allowed, -e.g. in a project's README file. - -You can get the embed snippets for a specific asciicast by clicking on "Share" -link on asciicast page. - -This is how they look for asciicast 14: - -HTML: - - - -Markdown: - - [![asciicast](https://asciinema.org/a/14.png)](https://asciinema.org/a/14) - -You can pass extra options (listed in "Customizing the playback" below) to the -linked URL as query params. For example, to start the playback automatically -when opening linked asciicast page append `?autoplay=1` to the asciicast URL in -`href` attribute: - - - -## Embedding the player - -If you're embedding on your own page or on a site which permits script tags, you -can use the full player widget. - -You can get the widget script for a specific asciicast by clicking on "Embed" -link on asciicast page. - -It looks like this: - - - -The player shows up right at the place where the script is pasted. Let's look -at the following markup: - -

This is some text.

- -

This is some other text.

- -The player is displayed between the two paragraphs, as a `div` element with -"asciicast" class. - -The embed script supports all customization options (see the section below). An -option can be specified by adding it as a -data-option-name="value" attribute to the script -tag. - -For example, to make the embedded player auto start playback when loaded and use -big font, use the following script: - - - -## Customizing the playback - -The player supports several options that control the behavior and look of it. -Append them to the URL (`?speed=2&theme=tango`) or set them as data attributes -on embed script (`data-speed="2" data-theme="tango"`). - -### t - -The `t` option specifies the time at which the playback should start. The -default is `t=0` (play from the beginning). - -Accepted formats: `ss`, `mm:ss`, `hh:mm:ss`. - -NOTE: when `t` is specified then `autoplay=1` is implied. To prevent the player -from starting automatically when `t` option is set you have to explicitly set -`autoplay=0`. - -### autoplay - -The `autoplay` option controls whether the playback should automatically start -when the player loads. Accepted values: - -* 0 / false - do not start playback automatically (default) -* 1 / true - start playback automatically - -### preload - -The `preload` option controls whether the player should immediately start -fetching the recording. - -* 0 / false - do not preload the recording, wait for user action -* 1 / true - preload the recording - -Defaults to 1 for asciinema.org URLs, to 0 for embed script. - -### loop - -The `loop` option allows for looping the playback. This option is usually -combined with `autoplay` option. Accepted values: - -* 0 / false - disable looping (default) -* 1 / true - enable looping - -### speed - -The `speed` option alters the playback speed. The default speed is 1 which -means it plays at the unaltered, original speed. - -### size - -The `size` option alters the size of the terminal font. There are 3 available -sizes: - -* small (default) -* medium -* big - -### theme - -The `theme` option allows overriding a theme used for the terminal. It defaults -to a theme set by the asciicast author (or to "asciinema" if not set by the -author). The available themes are: - -* asciinema -* tango -* solarized-dark -* solarized-light -* monokai - -## oEmbed / Open Graph / Twitter Card - -asciinema supports [oEmbed](http://oembed.com/), [Open Graph](http://ogp.me/) -and [Twitter Card](https://dev.twitter.com/cards/overview) APIs. When you share -an asciicast on Twitter, Slack, Facebook, Google+ or any other site which -supports one of these APIs, the asciicast is presented in a rich form (usually -with a title, author, description and a thumbnail image), linking to your -recording on asciinema.org. diff --git a/app/views/docs/faq.html.md b/app/views/docs/faq.html.md deleted file mode 100644 index 8c09f15..0000000 --- a/app/views/docs/faq.html.md +++ /dev/null @@ -1,87 +0,0 @@ -<% content_for(:title, 'FAQ') %> - -# Frequently Asked Questions - -## How is it pronounced? - -_[as-kee-nuh-muh]_. - -The word “asciinema” is a combination of English “ASCII” and Ancient Greek -“κίνημα” (kínēma, “movement”). - -## Why am I getting `command not found` at the begining of the recording session? - -When recording asciinema starts new shell instance (as indicated by `$SHELL` -environment variable) by default. It invokes `exec $SHELL`, which in most -cases translates to `exec /bin/bash` or `exec /bin/zsh`. This means the shell -runs as an "interactive shell", but **not as a "login shell"**. - -If you have functions and/or other shell configuration defined in either -`.bash_profile`, `.zprofile` or `.profile` file they are not loaded unless the -shell is started as a login shell. - -Some terminal emulators do that (passing "-l" option to the shell command-line), -some don't. asciinema doesn't. - -Worry not, you have several options. You can: - -* move this part of configuration to `.bashrc/.zshrc`, -* record with `asciinema rec -c "/bin/bash -l"` or, -* add the following setting to your `$HOME/.config/asciinema/config` file: - - [record] - command= /bin/bash -l - -## Why my shell prompt/theme isn't working during recording? - -See above. - -## Why some of my custom shell functions are not available during recording? - -See above. - -## Does it record the passwords I type during recording? - -asciinema records only terminal output - everything that you can actually see -in a terminal window. It doesn't record input (keys pressed). Some -applications turn off "echo mode" when asking for a password, and because -the passwords are not visible they are not recorded. Some applications -display star characters instead of real characters and asciinema records -only "******". However, some applications don't have any precautions and -the actual password is visible to the user, and thus recorded by asciinema. - -## Can I embed the asciicast player on my blog? - -Yes, see [embedding docs](<%= docs_path(:embedding) %>). - -## How can I delete my asciicast? - -In order to delete your asciicast you need to associate your local API token -(which was assigned to the recorded asciicast) with the asciinema.org -account. Just run `asciinema auth` in your terminal and open the printed URL -in your browser. Once you sign in you'll see a "Delete" link on your -asciicast's page. - -## Can I have my own asciinema site instance? - -Yes, you can set up your own asciinema site. The source code of the app that -runs asciinema.org is available -[here](https://github.com/asciinema/asciinema.org). - -When you have the site up and running you can easily tell asciinema client to -use it by adding following setting to _~/.config/asciinema/config_ file: - - [api] - url = http://asciinema.example.com - -Alternatively, you can set `ASCIINEMA_API_URL` env variable: - - ASCIINEMA_API_URL=http://asciinema.example.com asciinema rec - -## Can I edit/post-process the recorded asciicast? - -Yes, if you know how to deal with [ansi escape -sequences](https://en.wikipedia.org/wiki/ANSI_escape_code). Asciicasts are -self-contained JSON files which you can edit before uploading. Look at -`stdout` attribute in [asciicast format doc](https://github.com/asciinema/asciinema/blob/master/doc/asciicast-v1.md) -for inspiration. diff --git a/app/views/docs/getting-started.html.md b/app/views/docs/getting-started.html.md deleted file mode 100644 index dc0bfe3..0000000 --- a/app/views/docs/getting-started.html.md +++ /dev/null @@ -1,31 +0,0 @@ -<% content_for(:title, 'Getting started') %> - -# Getting started - -## 1. Install the recorder - -<%= render partial: "docs/quick_install" %> - -## 2. Record - -To start recording run the following command: - - asciinema rec - -This spawns a new shell instance and records all terminal output. -When you're ready to finish simply exit the shell either by typing `exit` or -hitting Ctrl-D. - -See [usage instructions](<%= docs_path(:usage) %>) to learn about all commands and options. - -## 3. Manage your recordings (optional) - -If you want to manage your recordings on asciinema.org (set title/description, -delete etc) you need to authenticate. Run the following command and open -displayed URL in your web browser: - - asciinema auth - -If you skip this step now, you can run the above command later and all -previously recorded asciicasts will automatically get assigned to your -profile. diff --git a/app/views/docs/how-it-works.html.md b/app/views/docs/how-it-works.html.md deleted file mode 100644 index ad3604b..0000000 --- a/app/views/docs/how-it-works.html.md +++ /dev/null @@ -1,76 +0,0 @@ -<% content_for(:title, 'How it works') %> - -# How it works - -asciinema project is built of several complementary pieces: - -* command-line based terminal session recorder, `asciinema`, -* website with an API at asciinema.org, -* javascript player - -When you run `asciinema rec` in your terminal the recording starts, capturing -all output that is being printed to your terminal while you're issuing the -shell commands. When the recording finishes (by hitting Ctrl-D or -typing `exit`) then the captured output is uploaded to asciinema.org website -and prepared for playback on the web. - -Here's a brief overview of how these parts work. - -## Recording - -You probably know `ssh`, `screen` or `script` command. Actually, asciinema -was inspired by `script` (and `scriptreplay`) commands. What you may not know -is they all use the same UNIX system capability: [a -pseudo-terminal](http://en.wikipedia.org/wiki/Pseudo_terminal). - -> A pseudo terminal is a pair of pseudo-devices, one of which, the slave, -> emulates a real text terminal device, the other of which, the master, -> provides the means by which a terminal emulator process controls the slave. - -Here's how terminal emulator interfaces with a user and a shell: - -> The role of the terminal emulator process is to interact with the user; to -> feed text input to the master pseudo-device for use by the shell (which is -> connected to the slave pseudo-device) and to read text output from the -> master pseudo-device and show it to the user. - -In other words, pseudo-terminals give programs the ability to act as a -middlemen between the user, the display and the shell. It allows for -transparent capture of user input (keyboard) and terminal output (display). -`screen` command utilizes it for capturing special keyboard shortcuts like -Ctrl-A and altering the output in order to display window -numbers/names and other messages. - -asciinema recorder does its job by utilizing pseudo-terminal for capturing all -the output that goes to a terminal and saving it in memory (together with timing -information). The captured output includes all the text and invisible -escape/control sequences in a raw, unaltered form. When the recording session -finishes it uploads the output (in -[asciicast format](https://github.com/asciinema/asciinema/blob/master/doc/asciicast-v1.md)) -to asciinema.org. That's all about "recording" part. - -For the implementation details check out [recorder source -code](https://github.com/asciinema/asciinema). - -## Playback - -As the recording is a raw stream of text and control -sequences it can't be just played by incrementally printing text in proper -intervals. It requires interpretation of [ANSI escape code -sequences](http://en.wikipedia.org/wiki/ANSI_escape_code) in order to -correctly display color changes, cursor movement and printing text at proper -places on the screen. - -The player comes with its own terminal emulator based on -[Paul Williams' parser for ANSI-compatible video terminals](http://vt100.net/emu/dec_ansi_parser). -It covers only the display part of the emulation as this is what the player is -about (input is handled by your terminal+shell at the time of recording anyway) -and its handling of escape sequences is fully compatible with most modern -terminal emulators like xterm, Gnome Terminal, iTerm, mosh etc. - -The end result is a smooth animation with all text attributes (bold, -underline, inverse, ...) and 256 colors perfectly rendered. - -For the implementation details check out [asciinema.org website source -code](https://github.com/asciinema/asciinema.org) and [player source -code](https://github.com/asciinema/asciinema-player). diff --git a/app/views/docs/installation.html.md b/app/views/docs/installation.html.md deleted file mode 100644 index 20c0784..0000000 --- a/app/views/docs/installation.html.md +++ /dev/null @@ -1,125 +0,0 @@ -<% content_for(:title, 'Installation') %> - -# Installation - -There are several ways to get asciinema recorder: - -- [Installing via Pip](#installing-via-pip) -- [Installing on Linux](#installing-on-linux) -- [Installing on Linux as snap](#installing-on-linux-as-snap) (universal Linux package) -- [Installing on macOS](#installing-on-macos) -- [Installing on FreeBSD](#installing-on-freebsd) -- [Installing on OpenBSD](#installing-on-openbsd) -- [Running in Docker container](#running-in-docker-container) -- [Running from source](#running-from-source) - -If you use other operating system and you can build a native package for it then -don't hesitate, do it and let us know. We have [Github -issue](https://github.com/asciinema/asciinema/issues/116) where we track new -releases and packaging progress. - -## Installing via Pip - -asciinema is available on [PyPI](https://pypi.python.org/pypi/asciinema) and can -be installed with pip (Python 3 required): - - sudo pip3 install asciinema - -This is the universal installation method for all operating systems, which -always provides the latest version. - -## Installing on Linux - -### Arch Linux - - pacman -S asciinema - -### Debian - - sudo apt-get install asciinema - -### Fedora - -For Fedora < 22: - - sudo yum install asciinema - -For Fedora >= 22: - - sudo dnf install asciinema - -### Gentoo Linux - - emerge -av asciinema - -### NixOS / Nix - - nix-env -i asciinema - -### openSUSE - - zypper in asciinema - -### Ubuntu - - sudo apt-add-repository ppa:zanchey/asciinema - sudo apt-get update - sudo apt-get install asciinema - -## Installing on Linux as snap - -Install asciinema in seconds on [Ubuntu and other snap supported Linux distributions](https://snapcraft.io/docs/core/install) with: - - snap install asciinema --classic - -Installing a snap is very quick. Snaps contain all necessary dependencies required to run. The snap will get automatically updated when a new version is pushed to the store. - -## Installing on macOS - -### Homebrew - -<%= render 'install_homebrew' %> - -### MacPorts - - sudo port selfupdate && sudo port install asciinema - -### Nix - - nix-env -i asciinema - -## Installing on FreeBSD - -### Ports - - cd /usr/ports/textproc/asciinema && make install - -### Packages - - pkg install asciinema - -## Installing on OpenBSD - - pkg_add asciinema - -## Running in Docker container - -asciinema Docker image is based on Ubuntu 16.04 and has the latest version of -asciinema recorder pre-installed. - - docker pull asciinema/asciinema - -When running it don't forget to allocate a pseudo-TTY (`-t`), keep STDIN open -(`-i`) and mount config directory volume (`-v`): - - docker run --rm -ti -v "$HOME/.config/asciinema":/root/.config/asciinema asciinema/asciinema - -## Running from source - -If none of the above works for you (or you want to help with development) just -clone the repo and run latest version of asciinema straight from the master -branch: - - git clone https://github.com/asciinema/asciinema.git - cd asciinema - python3 -m asciinema --version diff --git a/app/views/docs/usage.html.md b/app/views/docs/usage.html.md deleted file mode 100644 index 903ae61..0000000 --- a/app/views/docs/usage.html.md +++ /dev/null @@ -1,112 +0,0 @@ -<% content_for(:title, 'Usage') %> - -# Usage - -asciinema is composed of multiple commands, similar to `git`, `apt-get` or -`brew`. - -When you run `asciinema` with no arguments help message is displayed, listing -all available commands with their options. - -## `rec [filename]` - -__Record terminal session.__ - -This is the single most important command in asciinema, since it is how you -utilize this tool's main job. - -By running `asciinema rec [filename]` you start a new recording session. The -command (process) that is recorded can be specified with `-c` option (see -below), and defaults to `$SHELL` which is what you want in most cases. - -Recording finishes when you exit the shell (hit Ctrl+D or type -`exit`). If the recorded process is not a shell then recording finishes when -the process exits. - -If the `filename` argument is given then the resulting recording (called -[asciicast](https://github.com/asciinema/asciinema/blob/master/doc/asciicast-v1.md)) -is saved to a local file. It can later be replayed with `asciinema play -` and/or uploaded to asciinema.org with `asciinema upload -`. If the `filename` argument is omitted then (after asking for -confirmation) the resulting asciicast is uploaded to asciinema.org for further -playback in a web browser. - -`ASCIINEMA_REC=1` is added to recorded process environment variables. This -can be used by your shell's config file (`.bashrc`, `.zshrc`) to alter the -prompt or play a sound when shell is being recorded. - -Available options: - -* `-c, --command=` - Specify command to record, defaults to $SHELL -* `-t, --title=` - Specify the title of the asciicast -* `-w, --max-wait=<sec>` - Reduce recorded terminal inactivity to max <sec> seconds -* `-y, --yes` - Answer "yes" to all prompts (e.g. upload confirmation) -* `-q, --quiet` - Be quiet, suppress all notices/warnings (implies -y) - -## `play <filename>` - -__Replay recorded asciicast in a terminal.__ - -This command replays given asciicast (as recorded by `rec` command) directly in -your terminal. - -Playing from a local file: - - asciinema play /path/to/asciicast.json - -Playing from HTTP(S) URL: - - asciinema play https://asciinema.org/a/22124.json - asciinema play http://example.com/demo.json - -Playing from asciicast page URL (requires `<link rel="alternate" -type="application/asciicast+json" href="....json">` in page's HTML): - - asciinema play https://asciinema.org/a/22124 - asciinema play http://example.com/blog/post.html - -Playing from stdin: - - cat /path/to/asciicast.json | asciinema play - - ssh user@host cat asciicast.json | asciinema play - - -Playing from IPFS: - - asciinema play ipfs:/ipfs/QmcdXYJp6e4zNuimuGeWPwNMHQdxuqWmKx7NhZofQ1nw2V - asciinema play fs:/ipfs/QmcdXYJp6e4zNuimuGeWPwNMHQdxuqWmKx7NhZofQ1nw2V - -Available options: - -* `-w, --max-wait=<sec>` - Reduce replayed terminal inactivity to max <sec> seconds - -NOTE: it is recommended to run `asciinema play` in a terminal of dimensions not -smaller than the one used for recording as there's no "transcoding" of control -sequences for new terminal size. - -## `upload <filename>` - -__Upload recorded asciicast to asciinema.org site.__ - -This command uploads given asciicast (as recorded by `rec` command) to -asciinema.org for further playback in a web browser. - -`asciinema rec demo.json` + `asciinema play demo.json` + `asciinema upload -demo.json` is a nice combo for when you want to review an asciicast before -publishing it on asciinema.org. - -## `auth` - -__Manage recordings on asciinema.org account.__ - -If you want to manage your recordings on asciinema.org (set title/description, -delete etc) you need to authenticate. This command displays the URL you should -open in your web browser to do that. - -On every machine you run asciinema recorder, you get a new, unique API token. If -you're already logged in on asciinema.org website and you run `asciinema auth` -from a new computer then this new device will be linked to your account. - -You can synchronize your [config file](<%= docs_path(:config) %>) (which keeps -the API token) across the machines so all of them use the same token, but that's -not necessary. You can assign new tokens to your account from as many machines -as you want. diff --git a/app/views/home/show.html.slim b/app/views/home/show.html.slim index e71d4b5..e729e40 100644 --- a/app/views/home/show.html.slim +++ b/app/views/home/show.html.slim @@ -30,7 +30,7 @@ ' [as-kee-nuh-muh] ' is a free and open source solution for recording terminal sessions and sharing them on the web. Read about - a href=docs_path('how-it-works') how it works + a href="/docs/how-it-works" how it works ' . section.odd @@ -42,7 +42,7 @@ ' Record right where you work - in a terminal. To start just run <code>asciinema rec</code>, to finish hit <kbd>Ctrl-D</kbd> or type <code>exit</code>. p - a href=docs_path('getting-started') Get started » + a href="/docs/getting-started" Get started » .col-md-4 h1 Copy & paste @@ -56,7 +56,7 @@ p ' Easily embed an asciicast player in your blog post, project documentation page or in your conference talk slides. p - a href=docs_path(:embedding) See the embedding docs » + a href="/docs/embedding" See the embedding docs » section.even .container diff --git a/app/views/layouts/_header.html.slim b/app/views/layouts/_header.html.slim index b3e41aa..8a308f8 100644 --- a/app/views/layouts/_header.html.slim +++ b/app/views/layouts/_header.html.slim @@ -13,7 +13,7 @@ header.navbar.navbar-default[role="navigation"] li = link_to "Browse", category_path(:featured) li - = link_to "Docs", docs_index_path + = link_to "Docs", "/docs" li = link_to "Blog", 'http://blog.asciinema.org' diff --git a/app/views/layouts/docs.html.slim b/app/views/layouts/docs.html.slim deleted file mode 100644 index e190fb7..0000000 --- a/app/views/layouts/docs.html.slim +++ /dev/null @@ -1,10 +0,0 @@ -- content_for :content do - - cache do - .container - .row - .col-md-3 - = render 'docs_topics', current_category: @current_category - .col-md-9 - = yield - -= render :template => 'layouts/application' diff --git a/app/views/pages/about.html.md b/app/views/pages/about.html.md index 526e75f..34744c9 100644 --- a/app/views/pages/about.html.md +++ b/app/views/pages/about.html.md @@ -16,7 +16,7 @@ asciinema project is built of several sub-projects: * javascript player ([source code](https://github.com/asciinema/asciinema-player)) If technical details interest you then read more about -[how it works](<%= docs_path('how-it-works') %>). +[how it works](/docs/how-it-works). ## Contributing diff --git a/app/views/users/_recording_instructions.html.slim b/app/views/users/_recording_instructions.html.slim index 176a5cc..45a3761 100644 --- a/app/views/users/_recording_instructions.html.slim +++ b/app/views/users/_recording_instructions.html.slim @@ -1,5 +1,5 @@ markdown: - Make sure you have asciinema recorder [installed](#{docs_path(:installation)}). + Make sure you have asciinema recorder [installed](/docs/installation). To start recording run the following command in your terminal: diff --git a/config/routes.rb b/config/routes.rb index b0f66d1..391ef0a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -21,9 +21,6 @@ Rails.application.routes.draw do resources :asciicasts end - get "/docs" => "docs#show", :page => 'getting-started', :as => :docs_index - get "/docs/:page" => "docs#show", :as => :docs - resource :login, only: [:new, :create] do get :sent end diff --git a/spec/controllers/docs_controller_spec.rb b/spec/controllers/docs_controller_spec.rb deleted file mode 100644 index 6f5c235..0000000 --- a/spec/controllers/docs_controller_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'rails_helper' - -describe DocsController do - -end diff --git a/spec/features/docs_spec.rb b/spec/features/docs_spec.rb deleted file mode 100644 index 6cd84e6..0000000 --- a/spec/features/docs_spec.rb +++ /dev/null @@ -1,65 +0,0 @@ -require 'rails_helper' - -feature "Docs" do - - scenario 'Visiting "how it works" page' do - visit docs_path('how-it-works') - - within('.main') do - expect(page).to have_content('How it works') - end - - expect_doc_links - end - - scenario 'Visiting "getting started" page' do - visit docs_path('getting-started') - - within('.main') do - expect(page).to have_content('Getting started') - end - - expect_doc_links - end - - scenario 'Visiting installation page' do - visit docs_path(:installation) - - within('.main') do - expect(page).to have_content('Installation') - end - - expect_doc_links - end - - scenario 'Visiting usage page' do - visit docs_path(:usage) - - within('.main') do - expect(page).to have_content('Usage') - end - - expect_doc_links - end - - scenario 'Visiting embedding page' do - visit docs_path(:embedding) - - within('.main') do - expect(page).to have_content('Embedding') - end - - expect_doc_links - end - - scenario 'Visiting FAQ page' do - visit docs_path(:faq) - - within('.main') do - expect(page).to have_content('Frequently Asked Questions') - end - - expect_doc_links - end - -end