commit 1e8c5a972b753a77e07f9585e830772332d5ea49 Author: Nikhil Vengal Date: Fri Nov 7 13:34:32 2025 -0800 From https://once.com/writebook diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..f9d86d4 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,8 @@ +# Omakase Ruby styling for Rails +inherit_gem: { rubocop-rails-omakase: rubocop.yml } + +# Overwrite or add rules to create your own house style +# +# # Use `[a, [b, c]]` not `[ a, [ b, c ] ]` +# Layout/SpaceInsideArrayLiteralBrackets: +# Enabled: false diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..bea438e --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.3.1 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d974efb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,65 @@ +# syntax = docker/dockerfile:1 + +# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile +ARG RUBY_VERSION=3.3.1 +FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base + +# Rails app lives here +WORKDIR /rails + +# Set production environment +ENV RAILS_ENV="production" \ + BUNDLE_DEPLOYMENT="1" \ + BUNDLE_PATH="/usr/local/bundle" \ + BUNDLE_WITHOUT="development" + + +# Throw-away build stage to reduce size of final image +FROM --platform=$TARGETPLATFORM base as build + +# Install packages needed to build gems +RUN apt-get update -qq && \ + apt-get install --no-install-recommends -y build-essential git libvips pkg-config + +# Install application gems +COPY Gemfile Gemfile.lock .ruby-version ./ +RUN bundle install && \ + rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git + +# Copy application code +COPY . . + +# Precompiling assets for production without requiring secret RAILS_MASTER_KEY +RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile + + +# Final stage for app image +FROM base + +# Install packages needed for deployment +RUN apt-get update -qq && \ + apt-get install --no-install-recommends -y curl libjemalloc2 libsqlite3-0 libvips redis && \ + rm -rf /var/lib/apt/lists /var/cache/apt/archives + +# Copy built artifacts: gems, application +COPY --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}" +COPY --from=build /rails /rails + +# Run and own only the runtime files as a non-root user for security +RUN groupadd --system --gid 1000 rails && \ + useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash && \ + chown -R rails:rails db log storage tmp +USER 1000:1000 + +# Set version and revision +ARG APP_VERSION +ENV APP_VERSION=$APP_VERSION +ARG GIT_REVISION +ENV GIT_REVISION=$GIT_REVISION + +# Entrypoint prepares the application. +ENTRYPOINT ["/rails/bin/docker-entrypoint"] + +# Start the server by default, this can be overwritten at runtime +EXPOSE 80 443 +CMD ["bin/boot"] diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..ada4589 --- /dev/null +++ b/Gemfile @@ -0,0 +1,49 @@ +source "https://rubygems.org" + +ruby file: ".ruby-version" + +gem "rails", github: "rails/rails" + +# Drivers +gem "sqlite3", "~> 1.4" +gem "redis", ">= 4.0.1" + +# Deployment +gem "puma", ">= 5.0" + +# Jobs +gem "resque", "~> 2.6.0" +gem "resque-pool", "~> 0.7.1" + +# Front-end +gem "propshaft" +gem "importmap-rails" +gem "turbo-rails" +gem "stimulus-rails" + +# Other +gem "jbuilder" +gem "redcarpet", "~> 3.6" +gem "rouge", "~> 4.2" +gem "bcrypt", "~> 3.1.7" +gem "image_processing", "~> 1.2" +gem "rqrcode" +gem "thruster" +gem "useragent", github: "basecamp/useragent" +gem "front_matter_parser" + +group :development, :test do + gem "debug" + gem "faker", require: false + gem "brakeman", require: false + gem "rubocop-rails-omakase", require: false +end + +group :development do + gem "web-console" +end + +group :test do + gem "capybara" + gem "selenium-webdriver" +end diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..4b43c68 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,390 @@ +GIT + remote: https://github.com/basecamp/useragent.git + revision: 746e37ba93cef6399920d18ad88903db92ba4e30 + specs: + useragent (0.16.10) + +GIT + remote: https://github.com/rails/rails.git + revision: c9075e3643ecaed3b053b0fe50799895b71474af + specs: + actioncable (8.0.0.alpha) + actionpack (= 8.0.0.alpha) + activesupport (= 8.0.0.alpha) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + zeitwerk (~> 2.6) + actionmailbox (8.0.0.alpha) + actionpack (= 8.0.0.alpha) + activejob (= 8.0.0.alpha) + activerecord (= 8.0.0.alpha) + activestorage (= 8.0.0.alpha) + activesupport (= 8.0.0.alpha) + mail (>= 2.8.0) + actionmailer (8.0.0.alpha) + actionpack (= 8.0.0.alpha) + actionview (= 8.0.0.alpha) + activejob (= 8.0.0.alpha) + activesupport (= 8.0.0.alpha) + mail (>= 2.8.0) + rails-dom-testing (~> 2.2) + actionpack (8.0.0.alpha) + actionview (= 8.0.0.alpha) + activesupport (= 8.0.0.alpha) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actiontext (8.0.0.alpha) + actionpack (= 8.0.0.alpha) + activerecord (= 8.0.0.alpha) + activestorage (= 8.0.0.alpha) + activesupport (= 8.0.0.alpha) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (8.0.0.alpha) + activesupport (= 8.0.0.alpha) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (8.0.0.alpha) + activesupport (= 8.0.0.alpha) + globalid (>= 0.3.6) + activemodel (8.0.0.alpha) + activesupport (= 8.0.0.alpha) + activerecord (8.0.0.alpha) + activemodel (= 8.0.0.alpha) + activesupport (= 8.0.0.alpha) + timeout (>= 0.4.0) + activestorage (8.0.0.alpha) + actionpack (= 8.0.0.alpha) + activejob (= 8.0.0.alpha) + activerecord (= 8.0.0.alpha) + activesupport (= 8.0.0.alpha) + marcel (~> 1.0) + activesupport (8.0.0.alpha) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + logger + minitest (>= 5.1) + tzinfo (~> 2.0, >= 2.0.5) + rails (8.0.0.alpha) + actioncable (= 8.0.0.alpha) + actionmailbox (= 8.0.0.alpha) + actionmailer (= 8.0.0.alpha) + actionpack (= 8.0.0.alpha) + actiontext (= 8.0.0.alpha) + actionview (= 8.0.0.alpha) + activejob (= 8.0.0.alpha) + activemodel (= 8.0.0.alpha) + activerecord (= 8.0.0.alpha) + activestorage (= 8.0.0.alpha) + activesupport (= 8.0.0.alpha) + bundler (>= 1.15.0) + railties (= 8.0.0.alpha) + railties (8.0.0.alpha) + actionpack (= 8.0.0.alpha) + activesupport (= 8.0.0.alpha) + irb (~> 1.13) + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) + +GEM + remote: https://rubygems.org/ + specs: + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + ast (2.4.2) + base64 (0.2.0) + bcrypt (3.1.20) + bigdecimal (3.1.8) + bindex (0.8.1) + brakeman (6.1.2) + racc + builder (3.3.0) + capybara (3.40.0) + addressable + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.11) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + chunky_png (1.4.0) + concurrent-ruby (1.3.3) + connection_pool (2.4.1) + crass (1.0.6) + date (3.3.4) + debug (1.9.2) + irb (~> 1.10) + reline (>= 0.3.8) + drb (2.2.1) + erubi (1.13.0) + faker (3.4.1) + i18n (>= 1.8.11, < 2) + ffi (1.17.0-aarch64-linux-gnu) + ffi (1.17.0-arm-linux-gnu) + ffi (1.17.0-arm64-darwin) + ffi (1.17.0-x86-linux-gnu) + ffi (1.17.0-x86_64-darwin) + ffi (1.17.0-x86_64-linux-gnu) + front_matter_parser (1.0.1) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.5) + concurrent-ruby (~> 1.0) + image_processing (1.12.2) + mini_magick (>= 4.9.5, < 5) + ruby-vips (>= 2.0.17, < 3) + importmap-rails (2.0.1) + actionpack (>= 6.0.0) + activesupport (>= 6.0.0) + railties (>= 6.0.0) + io-console (0.7.2) + irb (1.13.1) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + jbuilder (2.12.0) + actionview (>= 5.0.0) + activesupport (>= 5.0.0) + json (2.7.2) + language_server-protocol (3.17.0.3) + logger (1.6.0) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.4) + matrix (0.4.2) + mini_magick (4.13.0) + mini_mime (1.1.5) + minitest (5.23.1) + mono_logger (1.1.2) + multi_json (1.15.0) + mustermann (3.0.0) + ruby2_keywords (~> 0.0.1) + net-imap (0.4.12) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.5.0) + net-protocol + nio4r (2.7.3) + nokogiri (1.16.6-aarch64-linux) + racc (~> 1.4) + nokogiri (1.16.6-arm-linux) + racc (~> 1.4) + nokogiri (1.16.6-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.6-x86-linux) + racc (~> 1.4) + nokogiri (1.16.6-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.16.6-x86_64-linux) + racc (~> 1.4) + parallel (1.25.1) + parser (3.3.3.0) + ast (~> 2.4.1) + racc + propshaft (0.8.0) + actionpack (>= 7.0.0) + activesupport (>= 7.0.0) + rack + railties (>= 7.0.0) + psych (5.1.2) + stringio + public_suffix (5.0.5) + puma (6.4.2) + nio4r (~> 2.0) + racc (1.8.0) + rack (3.1.3) + rack-protection (4.0.0) + base64 (>= 0.1.0) + rack (>= 3.0.0, < 4) + rack-session (2.0.0) + rack (>= 3.0.0) + rack-test (2.1.0) + rack (>= 1.3) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + rainbow (3.1.1) + rake (13.2.1) + rdoc (6.7.0) + psych (>= 4.0.0) + redcarpet (3.6.0) + redis (5.2.0) + redis-client (>= 0.22.0) + redis-client (0.22.2) + connection_pool + redis-namespace (1.11.0) + redis (>= 4) + regexp_parser (2.9.2) + reline (0.5.9) + io-console (~> 0.5) + resque (2.6.0) + mono_logger (~> 1.0) + multi_json (~> 1.0) + redis-namespace (~> 1.6) + sinatra (>= 0.9.2) + resque-pool (0.7.1) + rake (>= 10.0, < 14.0) + resque (>= 1.22, < 3) + rexml (3.3.0) + strscan + rouge (4.3.0) + rqrcode (2.2.0) + chunky_png (~> 1.0) + rqrcode_core (~> 1.0) + rqrcode_core (1.2.0) + rubocop (1.64.1) + json (~> 2.3) + language_server-protocol (>= 3.17.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.31.1, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) + rubocop-minitest (0.35.0) + rubocop (>= 1.61, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-performance (1.21.0) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rails (2.25.0) + activesupport (>= 4.2.0) + rack (>= 1.1) + rubocop (>= 1.33.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rails-omakase (1.0.0) + rubocop + rubocop-minitest + rubocop-performance + rubocop-rails + ruby-progressbar (1.13.0) + ruby-vips (2.2.1) + ffi (~> 1.12) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + selenium-webdriver (4.21.1) + base64 (~> 0.2) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + sinatra (4.0.0) + mustermann (~> 3.0) + rack (>= 3.0.0, < 4) + rack-protection (= 4.0.0) + rack-session (>= 2.0.0, < 3) + tilt (~> 2.0) + sqlite3 (1.7.3-aarch64-linux) + sqlite3 (1.7.3-arm-linux) + sqlite3 (1.7.3-arm64-darwin) + sqlite3 (1.7.3-x86-linux) + sqlite3 (1.7.3-x86_64-darwin) + sqlite3 (1.7.3-x86_64-linux) + stimulus-rails (1.3.3) + railties (>= 6.0.0) + stringio (3.1.1) + strscan (3.1.0) + thor (1.3.1) + thruster (0.1.7) + thruster (0.1.7-aarch64-linux) + thruster (0.1.7-arm64-darwin) + thruster (0.1.7-x86_64-darwin) + thruster (0.1.7-x86_64-linux) + tilt (2.3.0) + timeout (0.4.1) + turbo-rails (2.0.5) + actionpack (>= 6.0.0) + activejob (>= 6.0.0) + railties (>= 6.0.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.5.0) + web-console (4.2.1) + actionview (>= 6.0.0) + activemodel (>= 6.0.0) + bindex (>= 0.4.0) + railties (>= 6.0.0) + webrick (1.8.1) + websocket (1.2.10) + websocket-driver (0.7.6) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + xpath (3.2.0) + nokogiri (~> 1.8) + zeitwerk (2.6.15) + +PLATFORMS + aarch64-linux + arm-linux + arm64-darwin + x86-linux + x86_64-darwin + x86_64-linux + +DEPENDENCIES + bcrypt (~> 3.1.7) + brakeman + capybara + debug + faker + front_matter_parser + image_processing (~> 1.2) + importmap-rails + jbuilder + propshaft + puma (>= 5.0) + rails! + redcarpet (~> 3.6) + redis (>= 4.0.1) + resque (~> 2.6.0) + resque-pool (~> 0.7.1) + rouge (~> 4.2) + rqrcode + rubocop-rails-omakase + selenium-webdriver + sqlite3 (~> 1.4) + stimulus-rails + thruster + turbo-rails + useragent! + web-console + +RUBY VERSION + ruby 3.3.1p55 + +BUNDLED WITH + 2.5.6 diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..20e1430 --- /dev/null +++ b/Procfile @@ -0,0 +1,3 @@ +web: bundle exec thrust bin/start-app +redis: redis-server config/redis.conf +workers: FORK_PER_JOB=false INTERVAL=0.1 bundle exec resque-pool diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..9a5ea73 --- /dev/null +++ b/Rakefile @@ -0,0 +1,6 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require_relative "config/application" + +Rails.application.load_tasks diff --git a/app/assets/images/.keep b/app/assets/images/.keep new file mode 100644 index 0000000..e69de29 diff --git a/app/assets/images/add.svg b/app/assets/images/add.svg new file mode 100644 index 0000000..29d9e50 --- /dev/null +++ b/app/assets/images/add.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/alert.svg b/app/assets/images/alert.svg new file mode 100644 index 0000000..90c7c0b --- /dev/null +++ b/app/assets/images/alert.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/arrow-left.svg b/app/assets/images/arrow-left.svg new file mode 100644 index 0000000..a09507d --- /dev/null +++ b/app/assets/images/arrow-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/arrow-reverse.svg b/app/assets/images/arrow-reverse.svg new file mode 100644 index 0000000..db2557f --- /dev/null +++ b/app/assets/images/arrow-reverse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/arrow-right.svg b/app/assets/images/arrow-right.svg new file mode 100644 index 0000000..796f0cb --- /dev/null +++ b/app/assets/images/arrow-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/art.svg b/app/assets/images/art.svg new file mode 100644 index 0000000..f2dcba6 --- /dev/null +++ b/app/assets/images/art.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/blank-slate-arrows.svg b/app/assets/images/blank-slate-arrows.svg new file mode 100644 index 0000000..58abedd --- /dev/null +++ b/app/assets/images/blank-slate-arrows.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/bookmark.svg b/app/assets/images/bookmark.svg new file mode 100644 index 0000000..f2bb0bb --- /dev/null +++ b/app/assets/images/bookmark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/books.svg b/app/assets/images/books.svg new file mode 100644 index 0000000..e10a6d4 --- /dev/null +++ b/app/assets/images/books.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/camera.svg b/app/assets/images/camera.svg new file mode 100644 index 0000000..cc14f95 --- /dev/null +++ b/app/assets/images/camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/check.svg b/app/assets/images/check.svg new file mode 100644 index 0000000..3d70a50 --- /dev/null +++ b/app/assets/images/check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/copy-paste.svg b/app/assets/images/copy-paste.svg new file mode 100644 index 0000000..6196f3f --- /dev/null +++ b/app/assets/images/copy-paste.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/covers/cover-black-og.png b/app/assets/images/covers/cover-black-og.png new file mode 100644 index 0000000..93789d0 Binary files /dev/null and b/app/assets/images/covers/cover-black-og.png differ diff --git a/app/assets/images/covers/cover-black.png b/app/assets/images/covers/cover-black.png new file mode 100644 index 0000000..7d109f8 Binary files /dev/null and b/app/assets/images/covers/cover-black.png differ diff --git a/app/assets/images/covers/cover-blue-og.png b/app/assets/images/covers/cover-blue-og.png new file mode 100644 index 0000000..0273895 Binary files /dev/null and b/app/assets/images/covers/cover-blue-og.png differ diff --git a/app/assets/images/covers/cover-blue.png b/app/assets/images/covers/cover-blue.png new file mode 100644 index 0000000..f7c9171 Binary files /dev/null and b/app/assets/images/covers/cover-blue.png differ diff --git a/app/assets/images/covers/cover-green-og.png b/app/assets/images/covers/cover-green-og.png new file mode 100644 index 0000000..3ab0d49 Binary files /dev/null and b/app/assets/images/covers/cover-green-og.png differ diff --git a/app/assets/images/covers/cover-green.png b/app/assets/images/covers/cover-green.png new file mode 100644 index 0000000..f7a9f44 Binary files /dev/null and b/app/assets/images/covers/cover-green.png differ diff --git a/app/assets/images/covers/cover-magenta-og.png b/app/assets/images/covers/cover-magenta-og.png new file mode 100644 index 0000000..4d14dba Binary files /dev/null and b/app/assets/images/covers/cover-magenta-og.png differ diff --git a/app/assets/images/covers/cover-magenta.png b/app/assets/images/covers/cover-magenta.png new file mode 100644 index 0000000..0002305 Binary files /dev/null and b/app/assets/images/covers/cover-magenta.png differ diff --git a/app/assets/images/covers/cover-orange-og.png b/app/assets/images/covers/cover-orange-og.png new file mode 100644 index 0000000..b677ae4 Binary files /dev/null and b/app/assets/images/covers/cover-orange-og.png differ diff --git a/app/assets/images/covers/cover-orange.png b/app/assets/images/covers/cover-orange.png new file mode 100644 index 0000000..f206ea9 Binary files /dev/null and b/app/assets/images/covers/cover-orange.png differ diff --git a/app/assets/images/covers/cover-violet-og.png b/app/assets/images/covers/cover-violet-og.png new file mode 100644 index 0000000..5bc931e Binary files /dev/null and b/app/assets/images/covers/cover-violet-og.png differ diff --git a/app/assets/images/covers/cover-violet.png b/app/assets/images/covers/cover-violet.png new file mode 100644 index 0000000..c56afa6 Binary files /dev/null and b/app/assets/images/covers/cover-violet.png differ diff --git a/app/assets/images/covers/cover-white-og.png b/app/assets/images/covers/cover-white-og.png new file mode 100644 index 0000000..aafdbf7 Binary files /dev/null and b/app/assets/images/covers/cover-white-og.png differ diff --git a/app/assets/images/covers/cover-white.png b/app/assets/images/covers/cover-white.png new file mode 100644 index 0000000..4f90a5d Binary files /dev/null and b/app/assets/images/covers/cover-white.png differ diff --git a/app/assets/images/crown.svg b/app/assets/images/crown.svg new file mode 100644 index 0000000..a5d104b --- /dev/null +++ b/app/assets/images/crown.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/default-avatar.svg b/app/assets/images/default-avatar.svg new file mode 100644 index 0000000..bb30051 --- /dev/null +++ b/app/assets/images/default-avatar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/default-picture.webp b/app/assets/images/default-picture.webp new file mode 100644 index 0000000..9696fae Binary files /dev/null and b/app/assets/images/default-picture.webp differ diff --git a/app/assets/images/demo/autosave-Ssql4X.gif b/app/assets/images/demo/autosave-Ssql4X.gif new file mode 100644 index 0000000..c393113 Binary files /dev/null and b/app/assets/images/demo/autosave-Ssql4X.gif differ diff --git a/app/assets/images/demo/book-permissions-QQFdnG.png b/app/assets/images/demo/book-permissions-QQFdnG.png new file mode 100644 index 0000000..d4ea52b Binary files /dev/null and b/app/assets/images/demo/book-permissions-QQFdnG.png differ diff --git a/app/assets/images/demo/do-a-record-TBoVla.png b/app/assets/images/demo/do-a-record-TBoVla.png new file mode 100644 index 0000000..3ed3f36 Binary files /dev/null and b/app/assets/images/demo/do-a-record-TBoVla.png differ diff --git a/app/assets/images/demo/do-cli-QqIe5C.png b/app/assets/images/demo/do-cli-QqIe5C.png new file mode 100644 index 0000000..f56b1e7 Binary files /dev/null and b/app/assets/images/demo/do-cli-QqIe5C.png differ diff --git a/app/assets/images/demo/do-console-bswkQF.png b/app/assets/images/demo/do-console-bswkQF.png new file mode 100644 index 0000000..7146738 Binary files /dev/null and b/app/assets/images/demo/do-console-bswkQF.png differ diff --git a/app/assets/images/demo/do-create-G0VYYI.png b/app/assets/images/demo/do-create-G0VYYI.png new file mode 100644 index 0000000..d75adc1 Binary files /dev/null and b/app/assets/images/demo/do-create-G0VYYI.png differ diff --git a/app/assets/images/demo/do-droplet-JAJscl.png b/app/assets/images/demo/do-droplet-JAJscl.png new file mode 100644 index 0000000..a235085 Binary files /dev/null and b/app/assets/images/demo/do-droplet-JAJscl.png differ diff --git a/app/assets/images/demo/do-ip-dc4gQX.png b/app/assets/images/demo/do-ip-dc4gQX.png new file mode 100644 index 0000000..29f8358 Binary files /dev/null and b/app/assets/images/demo/do-ip-dc4gQX.png differ diff --git a/app/assets/images/demo/do-password-AVWxbD.png b/app/assets/images/demo/do-password-AVWxbD.png new file mode 100644 index 0000000..3a13d9c Binary files /dev/null and b/app/assets/images/demo/do-password-AVWxbD.png differ diff --git a/app/assets/images/demo/do-plan-IZHiLO.png b/app/assets/images/demo/do-plan-IZHiLO.png new file mode 100644 index 0000000..fdad2b4 Binary files /dev/null and b/app/assets/images/demo/do-plan-IZHiLO.png differ diff --git a/app/assets/images/demo/edit-mode-ygeCcM.gif b/app/assets/images/demo/edit-mode-ygeCcM.gif new file mode 100644 index 0000000..8ba4165 Binary files /dev/null and b/app/assets/images/demo/edit-mode-ygeCcM.gif differ diff --git a/app/assets/images/demo/fullscreen-IbQnfM.png b/app/assets/images/demo/fullscreen-IbQnfM.png new file mode 100644 index 0000000..fc9f2db Binary files /dev/null and b/app/assets/images/demo/fullscreen-IbQnfM.png differ diff --git a/app/assets/images/demo/hz-console-menu-yPBmdi.png b/app/assets/images/demo/hz-console-menu-yPBmdi.png new file mode 100644 index 0000000..aa3cf68 Binary files /dev/null and b/app/assets/images/demo/hz-console-menu-yPBmdi.png differ diff --git a/app/assets/images/demo/hz-dash-MUZN1e.png b/app/assets/images/demo/hz-dash-MUZN1e.png new file mode 100644 index 0000000..1df5eb9 Binary files /dev/null and b/app/assets/images/demo/hz-dash-MUZN1e.png differ diff --git a/app/assets/images/demo/hz-ip-6FsMg0.png b/app/assets/images/demo/hz-ip-6FsMg0.png new file mode 100644 index 0000000..c11155b Binary files /dev/null and b/app/assets/images/demo/hz-ip-6FsMg0.png differ diff --git a/app/assets/images/demo/hz-plan-57QAVM.png b/app/assets/images/demo/hz-plan-57QAVM.png new file mode 100644 index 0000000..4dec299 Binary files /dev/null and b/app/assets/images/demo/hz-plan-57QAVM.png differ diff --git a/app/assets/images/demo/installation-qJ6Wol.png b/app/assets/images/demo/installation-qJ6Wol.png new file mode 100644 index 0000000..d231b62 Binary files /dev/null and b/app/assets/images/demo/installation-qJ6Wol.png differ diff --git a/app/assets/images/demo/markdown-toolbar-lnzfdA.png b/app/assets/images/demo/markdown-toolbar-lnzfdA.png new file mode 100644 index 0000000..d3c3ff1 Binary files /dev/null and b/app/assets/images/demo/markdown-toolbar-lnzfdA.png differ diff --git a/app/assets/images/demo/password-recovery-XKwPtX.png b/app/assets/images/demo/password-recovery-XKwPtX.png new file mode 100644 index 0000000..a17f0cf Binary files /dev/null and b/app/assets/images/demo/password-recovery-XKwPtX.png differ diff --git a/app/assets/images/demo/publishing-vP0uNP.gif b/app/assets/images/demo/publishing-vP0uNP.gif new file mode 100644 index 0000000..a7c6e43 Binary files /dev/null and b/app/assets/images/demo/publishing-vP0uNP.gif differ diff --git a/app/assets/images/demo/screenshot-2024-06-19-at-8-02-28-pm-PFWfLF.png b/app/assets/images/demo/screenshot-2024-06-19-at-8-02-28-pm-PFWfLF.png new file mode 100644 index 0000000..d231b62 Binary files /dev/null and b/app/assets/images/demo/screenshot-2024-06-19-at-8-02-28-pm-PFWfLF.png differ diff --git a/app/assets/images/demo/screenshot-2024-06-19-at-8-16-09-pm-1mjVns.png b/app/assets/images/demo/screenshot-2024-06-19-at-8-16-09-pm-1mjVns.png new file mode 100644 index 0000000..1bdbd54 Binary files /dev/null and b/app/assets/images/demo/screenshot-2024-06-19-at-8-16-09-pm-1mjVns.png differ diff --git a/app/assets/images/demo/session-transfer-xa3uF7.png b/app/assets/images/demo/session-transfer-xa3uF7.png new file mode 100644 index 0000000..a634491 Binary files /dev/null and b/app/assets/images/demo/session-transfer-xa3uF7.png differ diff --git a/app/assets/images/demo/users-GdhgKg.png b/app/assets/images/demo/users-GdhgKg.png new file mode 100644 index 0000000..3ac5982 Binary files /dev/null and b/app/assets/images/demo/users-GdhgKg.png differ diff --git a/app/assets/images/demo/writebook-manual.jpg b/app/assets/images/demo/writebook-manual.jpg new file mode 100644 index 0000000..728baf2 Binary files /dev/null and b/app/assets/images/demo/writebook-manual.jpg differ diff --git a/app/assets/images/download.svg b/app/assets/images/download.svg new file mode 100644 index 0000000..a0caad0 --- /dev/null +++ b/app/assets/images/download.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/email.svg b/app/assets/images/email.svg new file mode 100644 index 0000000..83ed9d9 --- /dev/null +++ b/app/assets/images/email.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/empty-cover.png b/app/assets/images/empty-cover.png new file mode 100644 index 0000000..b5aa1e9 Binary files /dev/null and b/app/assets/images/empty-cover.png differ diff --git a/app/assets/images/expand.svg b/app/assets/images/expand.svg new file mode 100644 index 0000000..4cc8cee --- /dev/null +++ b/app/assets/images/expand.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/eye.svg b/app/assets/images/eye.svg new file mode 100644 index 0000000..fc840a5 --- /dev/null +++ b/app/assets/images/eye.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/file-epub.svg b/app/assets/images/file-epub.svg new file mode 100644 index 0000000..20a60c9 --- /dev/null +++ b/app/assets/images/file-epub.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/file-html.svg b/app/assets/images/file-html.svg new file mode 100644 index 0000000..17635a0 --- /dev/null +++ b/app/assets/images/file-html.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/file-mobi.svg b/app/assets/images/file-mobi.svg new file mode 100644 index 0000000..d77df79 --- /dev/null +++ b/app/assets/images/file-mobi.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/file-pdf.svg b/app/assets/images/file-pdf.svg new file mode 100644 index 0000000..f1cc2c0 --- /dev/null +++ b/app/assets/images/file-pdf.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/globe.svg b/app/assets/images/globe.svg new file mode 100644 index 0000000..a72720c --- /dev/null +++ b/app/assets/images/globe.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/handle.svg b/app/assets/images/handle.svg new file mode 100644 index 0000000..874d8ea --- /dev/null +++ b/app/assets/images/handle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/history.svg b/app/assets/images/history.svg new file mode 100644 index 0000000..00d1662 --- /dev/null +++ b/app/assets/images/history.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/link.svg b/app/assets/images/link.svg new file mode 100644 index 0000000..9835e7d --- /dev/null +++ b/app/assets/images/link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/lock.svg b/app/assets/images/lock.svg new file mode 100644 index 0000000..4c9032a --- /dev/null +++ b/app/assets/images/lock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/login-keys.svg b/app/assets/images/login-keys.svg new file mode 100644 index 0000000..8383643 --- /dev/null +++ b/app/assets/images/login-keys.svg @@ -0,0 +1 @@ +login-keys \ No newline at end of file diff --git a/app/assets/images/logout.svg b/app/assets/images/logout.svg new file mode 100644 index 0000000..a50034a --- /dev/null +++ b/app/assets/images/logout.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/menu.svg b/app/assets/images/menu.svg new file mode 100644 index 0000000..44e8890 --- /dev/null +++ b/app/assets/images/menu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/minus.svg b/app/assets/images/minus.svg new file mode 100644 index 0000000..4ad10bc --- /dev/null +++ b/app/assets/images/minus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/page-picture-add.svg b/app/assets/images/page-picture-add.svg new file mode 100644 index 0000000..5ba0f18 --- /dev/null +++ b/app/assets/images/page-picture-add.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/page-picture.svg b/app/assets/images/page-picture.svg new file mode 100644 index 0000000..8501376 --- /dev/null +++ b/app/assets/images/page-picture.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/page-section-add.svg b/app/assets/images/page-section-add.svg new file mode 100644 index 0000000..07b7f90 --- /dev/null +++ b/app/assets/images/page-section-add.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/page-section.svg b/app/assets/images/page-section.svg new file mode 100644 index 0000000..46011b0 --- /dev/null +++ b/app/assets/images/page-section.svg @@ -0,0 +1 @@ + diff --git a/app/assets/images/page-text-add.svg b/app/assets/images/page-text-add.svg new file mode 100644 index 0000000..2b4c5cf --- /dev/null +++ b/app/assets/images/page-text-add.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/page-text.svg b/app/assets/images/page-text.svg new file mode 100644 index 0000000..9072ee8 --- /dev/null +++ b/app/assets/images/page-text.svg @@ -0,0 +1 @@ + diff --git a/app/assets/images/password.svg b/app/assets/images/password.svg new file mode 100644 index 0000000..48540ee --- /dev/null +++ b/app/assets/images/password.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/pencil.svg b/app/assets/images/pencil.svg new file mode 100644 index 0000000..b8224ad --- /dev/null +++ b/app/assets/images/pencil.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/people.svg b/app/assets/images/people.svg new file mode 100644 index 0000000..f1a61e5 --- /dev/null +++ b/app/assets/images/people.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/person.svg b/app/assets/images/person.svg new file mode 100644 index 0000000..1e29ed2 --- /dev/null +++ b/app/assets/images/person.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/qr-code.svg b/app/assets/images/qr-code.svg new file mode 100644 index 0000000..4ead6f2 --- /dev/null +++ b/app/assets/images/qr-code.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/rearrange.svg b/app/assets/images/rearrange.svg new file mode 100644 index 0000000..46fdf59 --- /dev/null +++ b/app/assets/images/rearrange.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/refresh.svg b/app/assets/images/refresh.svg new file mode 100644 index 0000000..d641d84 --- /dev/null +++ b/app/assets/images/refresh.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/remove.svg b/app/assets/images/remove.svg new file mode 100644 index 0000000..9e874f8 --- /dev/null +++ b/app/assets/images/remove.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/settings.svg b/app/assets/images/settings.svg new file mode 100644 index 0000000..3237d69 --- /dev/null +++ b/app/assets/images/settings.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/share.svg b/app/assets/images/share.svg new file mode 100644 index 0000000..43c6271 --- /dev/null +++ b/app/assets/images/share.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/text-bold.svg b/app/assets/images/text-bold.svg new file mode 100644 index 0000000..124bc39 --- /dev/null +++ b/app/assets/images/text-bold.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/text-bullets.svg b/app/assets/images/text-bullets.svg new file mode 100644 index 0000000..f14824e --- /dev/null +++ b/app/assets/images/text-bullets.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/text-code.svg b/app/assets/images/text-code.svg new file mode 100644 index 0000000..87ae640 --- /dev/null +++ b/app/assets/images/text-code.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/text-image.svg b/app/assets/images/text-image.svg new file mode 100644 index 0000000..e9b265d --- /dev/null +++ b/app/assets/images/text-image.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/text-italic.svg b/app/assets/images/text-italic.svg new file mode 100644 index 0000000..54c6e56 --- /dev/null +++ b/app/assets/images/text-italic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/text-link.svg b/app/assets/images/text-link.svg new file mode 100644 index 0000000..0e4512c --- /dev/null +++ b/app/assets/images/text-link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/text-numbers.svg b/app/assets/images/text-numbers.svg new file mode 100644 index 0000000..5a0302a --- /dev/null +++ b/app/assets/images/text-numbers.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/text-quote.svg b/app/assets/images/text-quote.svg new file mode 100644 index 0000000..12e2bbe --- /dev/null +++ b/app/assets/images/text-quote.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/theme-switch.svg b/app/assets/images/theme-switch.svg new file mode 100644 index 0000000..bd2c408 --- /dev/null +++ b/app/assets/images/theme-switch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/trash.svg b/app/assets/images/trash.svg new file mode 100644 index 0000000..1173c1d --- /dev/null +++ b/app/assets/images/trash.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/view-grid.svg b/app/assets/images/view-grid.svg new file mode 100644 index 0000000..fa6bca1 --- /dev/null +++ b/app/assets/images/view-grid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/view-list.svg b/app/assets/images/view-list.svg new file mode 100644 index 0000000..936dd3e --- /dev/null +++ b/app/assets/images/view-list.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/world.svg b/app/assets/images/world.svg new file mode 100644 index 0000000..3bba7df --- /dev/null +++ b/app/assets/images/world.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/write.svg b/app/assets/images/write.svg new file mode 100644 index 0000000..e8f3304 --- /dev/null +++ b/app/assets/images/write.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/writebook-icon.svg b/app/assets/images/writebook-icon.svg new file mode 100644 index 0000000..72a3d99 --- /dev/null +++ b/app/assets/images/writebook-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/markdown/demo/01-welcome.md b/app/assets/markdown/demo/01-welcome.md new file mode 100644 index 0000000..31cfe4c --- /dev/null +++ b/app/assets/markdown/demo/01-welcome.md @@ -0,0 +1,16 @@ +--- +title: Welcome +--- +# Welcome to Writebook + +Thanks for downloading Writebook. + +Writebook is remarkably simple software that allows you to publish text and pictures in a simple, browsable online book format. It's independent publishing for everyone. + +Use it for everything from an instruction manual (like this one!), to employee handbooks, internal technical runbooks, graphic novels, collections of short stories, poetry, blog posts, novels, or family history. Put it all into Writebook and instantly publish to the web. + +And because you host it yourself, you own all your own data. With no limits on readers or writers, you can create as many books as you like. You're in control. + +In the pages that follow we'll help you get started with Writebook and show you how it all works. + +We can't wait to see what you make with it! diff --git a/app/assets/markdown/demo/02-installation.md b/app/assets/markdown/demo/02-installation.md new file mode 100644 index 0000000..670497f --- /dev/null +++ b/app/assets/markdown/demo/02-installation.md @@ -0,0 +1,40 @@ +--- +title: Installation +--- +# Installation + +Since Writebook is something you need to install and host yourself, you’ll need a few things before you begin: + +1. Your own domain name. +2. A web server connected to the internet. +3. Some basic technical know-how. + +While Writebook isn’t difficult to set up, if you’re not a technical person you might want to get a techy friend to help. + +Ok, let’s get into it. + +Here’s how to get it running on your end: + +1. **FIRST, pick a machine to host Writebook.** If you need one in the cloud, we recommend checking out Digital Ocean ([instructions](/2/the-writebook-manual/180/installing-on-digital-ocean)) or Hetzner ([instructions](/2/the-writebook-manual/181/installing-on-hetzner)). +2. **THEN, point DNS to the IP address of the machine that’ll be hosting Writebook**. You need to point a domain (example.com) or subdomain (books.example.com) to the IP address of the machine hosting Writebook. Make sure it’s a straight DNS pointer, no proxying! (Don’t worry about SSL, Writebook will automatically set that up for you). +3. **NEXT, connect a terminal to the machine**. To run the install command, you must connect to the machine you’re using with either `SSH` or a web-based cloud console. +4. **LAST, install Writebook with one simple command**. Paste the command you received via email into the terminal on your server and wait while everything is installed (this may take up to 5 minutes). + +You personal install command will look something like this: +``` +/bin/bash -c "$(curl -fsSL http://once.test/install/5555-5555-5555-5555)" +``` + +**IMPORTANT NOTE: Do not give this install command out to anyone, or share it on the public internet. It is personalized to you, and the license is tied back to you. Your personalized purchase token can be found in the email you received after you downloaded Writebook** + +Running this command will automatically install Docker on your server if you’re using Linux (which is what everything in the cloud usually runs), then download the latest Writebook application as a container that can run on top of Docker. In the process, it’ll ask for the domain name you’re using to host Writebook, so that we can configure an SSL certificate for you. + + ![Screenshot 2024-06-19 at 8.02.28 PM.png](/u/screenshot-2024-06-19-at-8-02-28-pm-PFWfLF.png) + +That’s it! Now you’re ready to setup the first user on the new installation. Go to the `https://YOUR-DOMAIN` and the process will begin. Then you’ll be ready to invite the rest of your team to the system. + +Your Writebook installation will automatically update to the latest version every night at 2am (local time of your server). You can turn this off via the once command. You can also use this command to take a backup of your data, reset a password, and several other administrative functions. Just connect a terminal to the machine again and run the once command to see all the options. + +Enjoy publishing with Writebook! + +**P.S.** If you’d like to run multiple installations of Writebook, you’ll need to get one license per installation/domain. diff --git a/app/assets/markdown/demo/03-users-readers-and-writers.md b/app/assets/markdown/demo/03-users-readers-and-writers.md new file mode 100644 index 0000000..a919139 --- /dev/null +++ b/app/assets/markdown/demo/03-users-readers-and-writers.md @@ -0,0 +1,31 @@ +--- +title: Users, Readers & Writers +--- +# Users, Readers & Writers + +You can use Writebook alone, or invite others to publish with you. Users invited to Writebook can read books that are private to just your team, create their own books, or you can choose which books they can contribute to. + + ![users.png](/u/users-GdhgKg.png) + +## Inviting people +Your Writebook has a special join link you can share with people. When they hit the link they will be asked to enter their name, email address, and set a password for their account. Once they do, they'll be immediately signed in. + +You can find the join link by hitting the people button on the index of books. There you'll see the special URL which you can share via QR code or copy it to paste into an email, text, and chat. + +## Administrators + +Hit the _Crown_ button next to a person to designate them as an _Administrator_. Admins have access to every book on the account and can do things like remove people from the account, help them get back in if they forget their password, and regenerate the join URL if it falls into the wrong hands. + +## Book Permissions +For each book there are readers and writers. When you create a book you'll have the chance to choose who on the account can read it and who has permission to edit it. + + ![book-permissions.png](/u/book-permissions-QQFdnG.png) + +### Readers +Readers can see the book but can't make any edits or change any settings. They must be signed in to read it if the book isn't available on the public internet. More on that in a later chapter. + +### Writers +Writers all have full permission to read, edit, and change anything in the book. They can change the title, author, cover and any text or pictures. Admins are always writers. + +### Everyone +Flip the _Everyone_ switch to give everyone on the account read access to the book—this includes anyone who joins the account later. This setting is ideal for something like a company handbook that you want everyone on your team to instantly have access to. You can give writer access to individuals even when everyone is on. diff --git a/app/assets/markdown/demo/04-creating-your-book.md b/app/assets/markdown/demo/04-creating-your-book.md new file mode 100644 index 0000000..cf1a30c --- /dev/null +++ b/app/assets/markdown/demo/04-creating-your-book.md @@ -0,0 +1,13 @@ +--- +title: Creating your book +--- +# Creating your book + +From the index of books, hit the green `+` button to make your first book. Fill out the title, optional subtitle, and author. You can also upload a cover image if you have one. Finally, if there are other people on your account you can choose who can read and who can edit your book with you. All of this can be changed later so don't sweat it if you don't have it all figured out yet. + +## Managing pages +The table of contents is where you'll build the structure of your book. Think of it like a file manager where you can add [Text Pages, Section Pages, and Picture Pages](/1/the-writebook-manual/5/text-pages-section-pages-and-picture-pages). If you're used to writing starting with an outline, you're going to love it. + +The table of contents can be displayed at a list or as a grid of thumbnail representations of your pages. + +You can also rearrange and remove pages here. diff --git a/app/assets/markdown/demo/05-text-pages-etc.md b/app/assets/markdown/demo/05-text-pages-etc.md new file mode 100644 index 0000000..44a39a9 --- /dev/null +++ b/app/assets/markdown/demo/05-text-pages-etc.md @@ -0,0 +1,17 @@ +--- +title: Text Pages, Section Pages, and Picture Pages +--- +# Text Pages, Section Pages, and Picture Pages + +There are three kinds of pages you can use to create your book. + + ![Screenshot 2024-06-19 at 8.16.09 PM.png](/u/screenshot-2024-06-19-at-8-16-09-pm-1mjVns.png) + +## Text Pages +Text Pages can be as long as you want. They're for long-form formatted text. Text Pages are formatted with Markdown, a simple formatting tool for writing on the web. + +## Section Pages +Books in Writebook have a flat structure, just like physical books. Insert a Section Page to designate a new part, section, or chapter; or for quotations or short bold statements. + +## Picture Pages +Picture Pages hold a single, full-size individual image with an optional caption. diff --git a/app/assets/markdown/demo/06-writing.md b/app/assets/markdown/demo/06-writing.md new file mode 100644 index 0000000..d0c4f71 --- /dev/null +++ b/app/assets/markdown/demo/06-writing.md @@ -0,0 +1,28 @@ +--- +title: Writing with Writebook +--- +# Writing + +We've designed Writebook to be a calm, enjoyable and distraction-free place to write. + +Here's what you need to know. + +## Editing mode + +The first step when working on your book is to flip the switch and enter _Editing mode_. That will reveal the page toolbar and save button. Edit mode stays on even as you move around to other pages in your book while working. You can turn it off when you're done working or toggle it anytime to preview your changes as readers will see them. + + ![edit-mode.gif](/u/edit-mode-ygeCcM.gif) + +## Autosave + +Writebook automatically saves as you write so you don't have to think about saving or worry about losing your work. The _Save_ button in the page toolbar continually comminicates where the are unsaved changes, when it's in the process of saving, and when all changes have been saved. You can hit the button if you want to, but it'll save for you even if you don't. + + ![autosave.gif](/u/autosave-Ssql4X.gif) + +## Full Screen + +For more immersive, distraction-free writing hit the expand button at the top of the screen to enter fullscreen mode (on supported devices). [Full Screen](/2/the-writebook-manual/170/reading#fullscreen) hides most of the clutter and busyness of your device and operating system so you can focus on your work. _Hint: you can use Full Screen while reading, too!_ + +## Version history + +As you work on your book, Writebook will track when you've made a batch of changes and record them as a new version. Hit the _History_ button next to the _Save_ button to browse through previous versions of any page. diff --git a/app/assets/markdown/demo/07-using-markdown.md b/app/assets/markdown/demo/07-using-markdown.md new file mode 100644 index 0000000..2251bb5 --- /dev/null +++ b/app/assets/markdown/demo/07-using-markdown.md @@ -0,0 +1,97 @@ +--- +title: Using Markdown +--- +# Using Markdown + +Text Pages in Writebook use Markdown, a simple formatting tool for writing on the web. + +If you're already a Markdown expert, you can write your book with the same formatting you're accustomed to. Below you'll find a handy reference. + +But if you're new to Markdown, Writebook's text editing toolbar has the most common formatting tools for anyone who's familiar with a word processor. + + ![markdown-toolbar.png](/u/markdown-toolbar-lnzfdA.png) + +When you hit a formatting button, Writebook will wrap selected text in the corresponding Markdown formatting characters. + +## Basic formatting + +| Markdown | Converted to HTML | Result | +|----|---|----| +| `**bold**` | `bold` | **bold** | +| `_italic_` | `italic` | _italic_ | +| `` `code` `` | `code` | `code` | +| `[link](url)` | `link` | [link](url) | + +## Headings + +Heading levels 1–6 are indicated with one or more `#` characters. +``` +# Heading 1 +## Heading 2 +### Heading 3 +#### Heading 4 +##### Heading 5 +###### Heading 6 +``` + +# Heading 1 +## Heading 2 +### Heading 3 +#### Heading 4 +##### Heading 5 +###### Heading 6 + +*** + +## Block quotations +Use an email style `>` to create a block quotation. + +``` + > It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of light, it was the season of darkness, it was the spring of hope, it was the winter of despair, we had everything before us, we had nothing before us, we were all going direct to heaven, we were all going direct the other way–in short, the period was so far like the present period, that some of its noisiest authorities insisted on its being received, for good or for evil, in the superlative degree of comparison only. +``` +> It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of light, it was the season of darkness, it was the spring of hope, it was the winter of despair, we had everything before us, we had nothing before us, we were all going direct to heaven, we were all going direct the other way–in short, the period was so far like the present period, that some of its noisiest authorities insisted on its being received, for good or for evil, in the superlative degree of comparison only. + +*** + + +## Code blocks +Use three backticks to create a multi-line code block. Syntax highlighting is available when you specify the code language of the block. +
``` ruby
+puts 'Hello, Writebook!'  # Print out "Hello, Writebook!"
+```
+ +``` ruby +puts 'Hello, Writebook!' # Print out "Hello, Writebook!" +``` + +## Horizontal rules +Use three asterisks (or dashes) in a row to make a horizontal rule. +``` +*** +``` + +*** + +## Advanced formatting + +Writebook also supports `HTML` formatting in your pages. Tags like `

`, ``, ``, `

`, `

`, ``, ``, `
`, `
`, ``, `