All Projects → jadeallencook → Gdoc.js

jadeallencook / Gdoc.js

Licence: mit
Use Google Spreadsheets as your CMS & to save your inputs!

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Gdoc.js

Awesome Cms Core
Awesome CMS Core is an open source CMS built using ASP.Net Core & ReactJS with module seperation concern in mind and provide lastest trend of technology like .Net Core, React, Webpack, SASS, Background Job, Message Queue.
Stars: ✭ 352 (-16.78%)
Mutual labels:  cms
Halo
✍ 一款优秀的开源博客发布应用。
Stars: ✭ 20,521 (+4751.3%)
Mutual labels:  cms
Vue Cms
基于 Vue 和 ElementUI 构建的一个企业级后台管理系统
Stars: ✭ 415 (-1.89%)
Mutual labels:  cms
Roadiz
Roadiz is a polymorphic CMS based on a node system which can handle many types of services.
Stars: ✭ 365 (-13.71%)
Mutual labels:  cms
Leaa
Leaa is a monorepo restful CMS / Admin built with Nest.js (@nestjsx/crud, node.js) and Ant Design.
Stars: ✭ 375 (-11.35%)
Mutual labels:  cms
Coderedcms
A content management system for marketing websites based on Django and Wagtail.
Stars: ✭ 386 (-8.75%)
Mutual labels:  cms
Apostrophe
Apostrophe is a full-featured, open-source CMS built with Node.js that empowers organizations by combining in-context editing and headless architecture in a full-stack JS environment.
Stars: ✭ 3,733 (+782.51%)
Mutual labels:  cms
Masuit.myblogs
masuit.com个人博客站项目源码,https://masuit.com ,供参考、学习、引用、非商业性质的部署。基于.net5
Stars: ✭ 418 (-1.18%)
Mutual labels:  cms
Comcms core
COMCMS_Core 版本
Stars: ✭ 377 (-10.87%)
Mutual labels:  cms
Ketchup
A simple CMS 🍅
Stars: ✭ 390 (-7.8%)
Mutual labels:  cms
Graphql Auto Generating Cms
Use your existing graphQL schema to generate CMS in a couple steps. DEMO: http://cms-demo.web4fly.com/
Stars: ✭ 373 (-11.82%)
Mutual labels:  cms
Feather
Feather is a modern Swift-based content management system powered by Vapor 4.
Stars: ✭ 374 (-11.58%)
Mutual labels:  cms
Livestreet
LiveStreet CMS - платформа для коллективных блогов и социальных площадок.
Stars: ✭ 389 (-8.04%)
Mutual labels:  cms
Eleventy Netlify Boilerplate
A template for building a simple website with the Eleventy static site generator
Stars: ✭ 359 (-15.13%)
Mutual labels:  cms
Property web builder
The ultimate Ruby on Rails engine for creating real estate websites ⛺
Stars: ✭ 414 (-2.13%)
Mutual labels:  cms
Vue Notion
A fast Vue renderer for Notion pages
Stars: ✭ 343 (-18.91%)
Mutual labels:  cms
Joomla Cms
Home of the Joomla! Content Management System
Stars: ✭ 3,995 (+844.44%)
Mutual labels:  cms
Platformus
Platformus is free, open source, and cross-platform developer-friendly CMS based on ASP.NET Core, ExtCore framework, and Magicalizer.
Stars: ✭ 421 (-0.47%)
Mutual labels:  cms
Wx Manage
🔥微信公众号管理系统,包含公众号菜单管理🗄、自动回复🗨、素材管理📂、模板消息☘、粉丝管理🤹‍♂️等功能,前后端都开源免费🛩
Stars: ✭ 413 (-2.36%)
Mutual labels:  cms
Templatespider
扒网站工具,看好哪个网站,指定好URL,自动扒下来做成模版。所见网站,皆可为我所用!
Stars: ✭ 390 (-7.8%)
Mutual labels:  cms

gDoc.js v2.0.1

Use Google Spreadsheets as your CMS & to save your inputs!

Demo Page

Getting Started

Create a Google Spreadsheet containing all the information you will need for your site. After, choose 'Publish to the web...' in the 'File' menu. Then grab the id in the link.

https://docs.google.com/spreadsheets/d/__yourPublicId__/pubhtml

Inside of your HTML document include these two files.

<script src="tabletop.js"></script>
<script src="gDoc.js"></script>

Or just this file

<script src="gDoc.min.js"></script>

Now at the footer of your html page initiate the connection!

By default the sheetName is 'Sheet1'

<script>
    gDoc(yourPublicId, sheetName);
</script>

Example connection

<script>
    // initiating connection
    gDoc('1cfW7dwJkwJq7rqTsftNy3wjCJR3-yDylc5MRmsc0Yw8', 'layout');
</script>

All that's left now is to add gDoc attributes to your html!

Example spreadsheet

title header subheader
My website Welcome, This is my website!

How to insert from example spreadsheet above.

<html>
    <head>
        <title gDoc="title"></title>
        <script src="tabletop.js"></script>
        <script src="gDoc.js"></script>
    </head>
    <body>
        <h1 gDoc="header"></h1>
        <h2 gDoc="subheader"></h2>
    </body>
    <footer>
        <script>
            gDoc(yourPublicId, sheetName);
        </script>               
    </footer>
</html>

And it's that easy!

Setting Parameters

You might want to use gDoc to set link hrefs, img srcs, and set styles.

Here's a quick example of how you would make a red link

my-link my-link:href my-link:style
Example www.mylink.com color: red
<a gDoc="my-link"></a>

Advanced Blocks (Store & Blog)

To iterate over a block of html simply just pass gDoc an object {}.

Let's say you want to export your 4 most recent blog posts

gDoc({
    public: yourPublicId,
    sheet: 'blog',
    gDoc: 'blog-section',
    columns: ['title', 'body', 'link'],
    loop: 4,
    html: function() {
        var html = '<a href="{{link}}">';
        html += '<h1>{{title}}</h1>';
        html += '<p>{{body}}</p>';
        html += '</a>';
        return html;
    }
});

The loop key can be set to false to iterate over all items in the document. Make sure you instantiate all your variables in the 'columns' array, otherwise they won't show up in the mustache syntax.

Sending Data To Spreadsheet

The "connect" functionality uses AJAX, make sure jQuery is installed!

Create a Google Form by visiting forms.google.com and then press share to get the id.

https://docs.google.com/forms/d/e/__yourFormId__/viewform

Create a blank form that will hold your inputs.

<form id="example-form"></form>

In the footer, pass gDoc.js an object with these parameters.

gDoc({
    connect: true,
    id: yourFormId,
    appendTo: 'example-form'
});

That's it, all of your inputs are automatically inserted!

When submitted, the responses will be sent to the form, and your can export to spreadsheet from there.

Additionally you can add some optional parameters -

gDoc({
    connect: true,
    id: yourFormId,
    appendTo: 'example-form',
    submitValue: 'Submit Form', // submit button text
    successMsg: 'It worked!', // success message after submit
    preloader: 'loading.gif' // img to show while form is loading
});

As of right now, gDoc will only insert "text" inputs.

Custom Form CSS

Here is an example of how we would modify the above form's CSS.

    form#my-form input {
        display: block;
        margin: 5px auto;
        padding: 5px;
        border-radius: 3px;
        border: #ddd solid thin;
    }
    form#my-form input[type="submit"] {
        background-color: dodgerblue;
        color: #fff;
        border: none;
        border-radius: 3px;
    }

Enjoy!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].