GithubHelp home page GithubHelp logo

tile38 / tile38.github.io Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 15.0 49.01 MB

Tile38 documentation website

Home Page: http://tile38.com

CSS 15.91% Shell 1.76% HTML 21.61% JavaScript 59.85% Dockerfile 0.17% Makefile 0.70%

tile38.github.io's Introduction

Tile38 Website

This repository contains all of the files (excepting dependencies) necessary to edit, build, and deploy the Tile38 documentation website.

Table of Contents

Table of contents generated with markdown-toc

Branches

There are three main branches: master, docusaurus, and gh-pages.

Master

The master branch contains all documentation markdown (.md) and javascript (.js) files that must be edited to change the content on the documentation website

Docusaurus

The Tile38 documentation website is built using a customized version of the Docusaurus static website generator. The docusaurus branch contains the modified React-based Docusaurus component files required to build Tile38's documentation website. These files must be installed on your local machine using npm or your favorite other JavaScript package manager in order to build and test changes to the website (see Build section below for details).

gh-pages

The gh-pages branch contains the static website files for the Tile38 documentation website. These files are automatically generated from the markdown and other asset files found in the master branch during the build process. The deploy process pushes the static website files to this branch.

Never modify these files directly.

Edit Content

Only pages with an EDIT button can be modified by Non-Admin Contributors. The EDIT button can be found at the top right corner of the middle panel of any page found under the "Commands" or "Docs" categories of the Tile38 documentation website.

The EDIT button is not visible on screens smaller than 1,024 pixels wide.

For instructions on how to edit content see:

Non-Admin Contributors

  • todo

Admin Members

Clone Repo

If you have not done so already, clone this repo to your local machine:

git clone https://github.com/tile38/tile38.github.io.git

Make sure the master branch is checked out:

git checkout master

There are two ways to edit content as an Admin Member:

Via Local Machine

  • On your local machine, navigate to the content's .md file, which should be found in either the docs/commands or docs/topics directories.

  • Open the file in your favorite IDE or text/markdown editor and make the desired changes.

  • After saving your changes, you are ready to build and deploy them.

Via GitHub Repo

Content can be modified directly within this GitHub repo in one of two ways:

  • You can find the .md files for content in either the docs/commands or docs/topics directories of this repo's master branch and edit them directly from there.

    OR

  • Navigate to the content that you would like to modify on the Tile38 documentation website and click on the EDIT button found in the top right corner of the page. The EDIT button links to the .md file for that content in this repo's master branch.

Once you have navigated to the content's .md file:

  • Click on the pencil icon in the right corner of the content pane's header menu.

  • Make the desired changes to the .md file in GitHub's "Edit file" pane.

  • Commit the changes.

  • Pull the changed files down to the cloned repo on your local machine (make sure you are on the master branch).

    git pull

Your local copy of the repo should now be up to date. You are ready to build and deploy the changes.

Build

It is not necessary to run the build process described below if you just want to deploy the website without testing it. The deploy process builds the static website files before it publishes them to the gh-pages branch, a redundant process if you are building and testing changes to the site as well. But that's the way the Docusaurus folks set things up, and we chose not to change it. And why would you want to deploy changes before testing them, really? You wouldn't do that, of course you wouldn't, so ...

Install NPM

You will need to have npm installed in order to run the build command. To check if you have it installed, run the following at the command prompt:

npm -v

If you see command not found: npm in the output, go install npm.

Install Docusaurus Module

In order to build and test changes to website content, you will need to have the docusaurus branch of this repo installed in the ./website/node_modules/docusaurus/ directory of the cloned repo on your local machine. If that directory does not exist:

  • At the command prompt, navigate to the ./website directory of the clone of this repo on your local machine.

  • Run the install command:

    npm install

You should now have the most current version of our customized docusaurus component library installed with all its dependencies in the ./website/node_modules/ directory.

Build Static Pages

The build command populates the ./website/build/ directory with all of the static website's files.

  • Run the build command:

    npm run build

Any changes made to .md files in the master branch of this repo should now be reflected in the content's .html files in the gh-pages branch.

Test

You can test a local build of the website using Python's simple HTTP Server if you have Python installed:

  • At the command prompt, navigate to ./website/build/tile38.github.io.

  • Run Python's simple HTTP server:

    python -m SimpleHTTPServer # for Python version 2.x

    OR

    python3 -m http.server # for Python version 3.x
  • Open a browser window and view the website at URL localhost:8000.

If port 8000 is already in use, append the simple server command from above with a different port number, for example:

python -m SimpleHTTPServer 3000 # for Python version 2.x

Deploy

  • At the command prompt, navigate to the ./website directory of the cloned version of this repo on your local machine.
  • Run the publishing command (substitute your GitHub username for yourGitHubUserName in the script below):
GIT_USER=yourGitHubUserName \
CURRENT_BRANCH=master \
USE_SSH=false \
npm run publish-gh-pages

Changes should be visible on the live Tile38 Documentation website almost immediately (or within 10 minutes according to GitHub). Sometimes Google Chrome does not reflect the changes right away. Check the site on other browsers (Safari, Firefox, etc.). If the changes you made are showing up on those browsers, then for Chrome try the following:

  • Check/Uncheck the "disable cache" toggle in the Network tab of Chrome's developer tools.
  • Refresh the page (Click the circular arrow button next to the address bar).

Makefile

There's also a makefile that shortens the steps above.

make build   # build the site
make serve   # serve and test the site on your machine at port 8000
make publish # publish to tile38.github.io (https://tile38.com)

tile38.github.io's People

Contributors

bb avatar brncsk avatar dependabot[bot] avatar gdubya avatar iwpnd avatar jchamberlain avatar lars-meijer avatar lennycampino avatar m1ome avatar melbania avatar oliver006 avatar s32x avatar tidwall avatar tobilg avatar tomquas avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

tile38.github.io's Issues

Commands missing from docs

UNSUBSCRIBE and PUNSUBSCRIBE are missing from the command docs. I can help add the page content for the commands but am unsure if the command pages on website are auto-generated from commands.json in the Tile38 repo.
Brent

Typo on EVAL page

The EVAL page under topic SCRIPT LOAD the second ARGV[2} should be ARGV[3]

"return tile38.pcall('set', KEYS[1], ARGV[1], 'point', ARGV[2], ARGV[2])"

Generated source out of date?

When I run ./build.sh on master (head) git marks a lot of files as changed, so some files might not be up to date.
I think the files generated by building eg (/topics, /commands) etc. should not be in git anyway, and the output of build.sh should probably in a different folder.

[transfer] documentation is poor

Transferred from tidwall/tile38#590

hi,

I think this is an extraordinary project and for this I congratulate you

the command list is perfect(although references to redis could be inserted)
and also the Geofencing section is interesting

but the basic documentation should be more extensive, for example it would be useful:

a glossary with basic terms (key, channel ...)
general architecture of the project
a section dedicated to the cli client
I would like to contribute but I lack these bases

best regards
Stef

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.