Git Product home page Git Product logo

htmlhouse's Introduction

โŒ‚ HTMLhouse / ๐Ÿด CSShorse

โŒ‚ Publish HTML quickly / ๐Ÿด Develop a WriteFreely theme

HTMLhouse screenshot HTMLhouse screenshot

HTMLhouse uses ACE editor for modifying HTML and shows a live preview of what you've created in an iframe alongside the source code.

No user signup is required -- authorization to modify an individual published page is saved on the creator's device in local storage as an ID and JWT generated by the server.

It is also available as an Android app.

Development

Requirements

  • Go
  • Node.js
  • MySQL

Setup

  1. Clone the repo
  2. Run go get -d to get necessary dependencies
  3. Run make install to install LESS compiler locally and generate the CSS files
  4. Run the queries in init.sql to set up the database
  5. Optional. Run ./keys.sh prod to create a new keypair

Running the server

  • Run go run cmd/htmlhouse/main.go in the top level directory, optionally by creating a simple run script
#!/bin/bash

DB_USER=dbuser DB_PASSWORD=pass DB_DB=htmlhouse PRIVATE_KEY=keys/dev PUBLIC_KEY=keys/dev.pub go run main/main.go

Environment Variables

Variable What it is Default value
DB_USER Database user None. Required
DB_PASSWORD Database password None. Required
DB_DB Database name None. Required
DB_HOST Database host localhost
PRIVATE_KEY Generated private key None. Required
PUBLIC_KEY Generated public key None. Required
PORT Port to run app on 8080
STATIC_DIR Relative dir where static files are stored static
ALLOW_PUBLISH Allow users to publish posts true
AUTO_APPROVE Automatically approves public posts false
PREVIEWS_HOST Fully-qualified URL (without trailing slash) of screenshot server None.
ADMIN_PASS Password to perform admin functions via API uhoh
BROWSE_ITEMS Number of items to show on Browse page 10
BLACKLIST_TERMS Comma-separated list of terms to prevent a post from being made public None.
TWITTER_KEY Twitter consumer key notreal
TWITTER_SECRET Twitter consumer secret notreal
TWITTER_TOKEN Twitter access token of the posting Twitter account notreal
TWITTER_TOKEN_SECRET Twitter access token secret of the posting Twitter account notreal
WF_MODE Run CSShorse, not HTMLhouse โ€” for customizing WriteFreely blogs false

Notes

Changing CSS. Run make after all changes to update the stylesheets.

When you don't need to reload the app. When you make changes to any files in static/ you can simply refresh the resource without restarting the app.

When to reload the app. If you change any of the templates in templates/ or any .go file, you'll need to re-run the app.

htmlhouse's People

Contributors

christiangenco avatar thebaer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

htmlhouse's Issues

How to detect if the Html code hosted is Phishing?

If someone host html content which looks like facebook or twitter or similar popular platforms login page. And they get the login credentials by sending the post data to some other details.

Google may find the website as deceptive and shows dangerous warning.

Internal Server Error

Hello, I have an Internal Server Error popup when I want to publish a web page.
I follow the tutorial.

SSL certificate expired

When I go to the website, I get a warning saying that SSL certificate was expired 7 months ago, and I cannot proceed unless I click on advanced.

Multiple characters appear at the same time in <script> tag

Hello, thank you for the awesome product you have open sourced.

After installing, I'm having some problems with the editor. Characters start to appear multitimes.
So I'm typing <script> and suddenly it becomes >>>>

Anyone experienced that?
I tested on chrome and firefox, on ubuntu. The console gets full of errors like this:

VM2586:1 Uncaught SyntaxError: Invalid or unexpected tokenglobalEval @ jquery-2.1.4.min.js:2domManip @ jquery-2.1.4.min.js:3append @ jquery-2.1.4.min.js:3(anonymous function) @ jquery-2.1.4.min.js:3n.access @ jquery-2.1.4.min.js:2html @ jquery-2.1.4.min.js:3updatePreview @ wmfyogfj.html:87r._signal @ ace.js:1onChange @ ace.js:1r._signal @ ace.js:1applyDelta @ ace.js:1insertMergedLines @ ace.js:1insert @ ace.js:1insert @ ace.js:1insert @ ace.js:1exec @ ace.js:1(anonymous function) @ ace.js:1r._emit.r._dispatchEvent @ ace.js:1exec @ ace.js:1onTextInput @ ace.js:1onTextInput @ ace.js:1A @ ace.js:1O @ ace.js:1
VM2587:2 Uncaught SyntaxError: Invalid or unexpected tokenglobalEval @ jquery-2.1.4.min.js:2domManip @ jquery-2.1.4.min.js:3append @ jquery-2.1.4.min.js:3(anonymous function) @ jquery-2.1.4.min.js:3n.access @ jquery-2.1.4.min.js:2html @ jquery-2.1.4.min.js:3updatePreview @ wmfyogfj.html:87r._signal @ ace.js:1onChange @ ace.js:1r._signal @ ace.js:1applyDelta @ ace.js:1insertMergedLines @ ace.js:1insert @ ace.js:1insert @ ace.js:1insert @ ace.js:1exec @ ace.js:1(anonymous function) @ ace.js:1r._emit.r._dispatchEvent @ ace.js:1exec @ ace.js:1onTextInput @ ace.js:1onTextInput @ ace.js:1A @ ace.js:1O @ ace.js:1

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.