From 19b325b2787d2f38305b16df50d0f0dd8fb3bd9f Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Fri, 26 May 2017 13:02:17 -0700 Subject: [PATCH] add information on the Neocities CLI --- app/index.rb | 4 ++++ views/_footer.erb | 1 + views/cli.erb | 59 +++++++++++++++++++++++++++++++++++++++++++++++ views/index.erb | 6 ++--- 4 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 views/cli.erb diff --git a/app/index.rb b/app/index.rb index 40dfc5d3..06b033d2 100644 --- a/app/index.rb +++ b/app/index.rb @@ -133,6 +133,10 @@ get '/thankyou' do erb :'thankyou' end +get '/cli' do + erb :'cli' +end + get '/forgot_username' do erb :'forgot_username' end diff --git a/views/_footer.erb b/views/_footer.erb index 10423df3..b033d5da 100644 --- a/views/_footer.erb +++ b/views/_footer.erb @@ -11,6 +11,7 @@
  • About
  • Donate
  • <% unless is_education? %> +
  • CLI
  • Blog
  • API
  • Press
  • diff --git a/views/cli.erb b/views/cli.erb new file mode 100644 index 00000000..5a47cdee --- /dev/null +++ b/views/cli.erb @@ -0,0 +1,59 @@ +
    +
    +

    The Neocities CLI

    +

    Manage your site using a shell terminal

    +
    +
    + +
    +
    +

    Neocities has a CLI for power users that want to upload sites using a command line.

    + +

    Features

    + +
      +
    • Push support - uploads an entire directory. Great for static site generators. +
    • HTTP persistence - the CLI reuses a single HTTP connection, improving performance. +
    • Check before upload - checks if the file data matches before uploading. +
    • Gitignore parsing - automatically skips files in root gitignore file for git repositories. +
    + +

    Install Instructions

    + +

    If you're using a newer version of OSX or already have Ruby installed, just run this command to install:

    + + gem install neocities + +

    If you get a permission error, you may need to run the command as superuser:

    + + sudo gem install neocities + +

    After installation, just run the command to get started:

    + +
    $ neocities
    +
    +|\---/|
    +| o_o |   Neocities
    + \_-_/
    +
    +Subcommands:
    +  push        Recursively upload a local directory to your site
    +  upload      Upload individual files to your Neocities site
    +  delete      Delete files from your Neocities site
    +  list        List files from your Neocities site
    +  info        Information and stats for your site
    +  logout      Remove the site api key from the config
    + +

    Windows

    + +

    If you're using Windows, you can install ruby with something like the Ruby Installer, and then run the above command.

    + +

    Linux / BSD

    + +

    Most Linux / BSD distributions come with Ruby packages. For example, with Ubuntu:

    + + sudo apt-get install ruby-full + + A full list of available install options for ruby is here. +
    +
    diff --git a/views/index.erb b/views/index.erb index 45ee6ec5..478a5bd0 100644 --- a/views/index.erb +++ b/views/index.erb @@ -53,14 +53,14 @@

    Create your own free website.
    Unlimited creativity, zero ads.

    - Neocities is a social network of <%= @sites_count.to_s.reverse.gsub(/...(?=.)/,'\&,').reverse %> web sites that are bringing back the lost individual creativity of the web. We offer free web hosting and tools that allow you to create your own web site. Join us! + Neocities is a social network of <%= @sites_count.to_s.reverse.gsub(/...(?=.)/,'\&,').reverse %> web sites that are bringing back the lost individual creativity of the web. We offer free static web hosting and tools that allow you to create your own web site. Join us!