Git Product home page Git Product logo

ginger's Introduction

Build Status

Ginger

This is the Ginger Zotonic edition. This repository contains:

  • (most) Ginger modules
  • Docker configuration
  • shell scripts

Documentation

Getting started

Clone this repository and install Docker.

You can run Ginger in three ways:

  1. all-in Docker (easiest)
  2. selective Docker (recommended because it’s more flexible and has better performance while being only slightly harder to set up)
  3. don’t use Docker at all (hardest).

1. All-in Docker

To run Ginger completely in Docker containers, open a terminal and enter:

$ make up

To open a Zotonic shell:

$ make shell

To run Gulp in the Ginger directory:

$ make gulp site=your_site_name

To run the tests for a module, e.g. mod_ginger_collection:

$ docker-compose run zotonic bin/zotonic runtests mod_ginger_collection

If you want to run tests repeatedly, it may be easier to open a shell in a clean Zotonic container:

$ make prompt

and then make and run the tests:

$ make && bin/zotonic runtests mod_ginger_collection

For more, see the Docker doc chapter.

2. Selective Docker (recommended)

Due to limitations in Docker for Mac, file synchronization performance suffers when you have large amounts of files (i.e. many sites with node_modules/ directories).

By running Zotonic directly on your host (outside Docker) we circumvent this limitation. Another advantage is that you can directly make changes in Zotonic source code, too.

All other services (PostgreSQL, Elasticsearch, Kibana) still run in containers.

First, install Zotonic’s dependencies, including Erlang:

$ brew install erlang@21 fswatch imagemagick
$ brew link erlang@21 --force

Then clone both Ginger and Zotonic:

$ git clone https://github.com/driebit/ginger.git
$ git clone https://github.com/zotonic/zotonic.git --branch 0.x 

Copy Ginger’s configuration file, which includes its dependencies:

$ mkdir -p ~/.zotonic/0
$ cp ginger/config/zotonic.config ~/.zotonic/0/zotonic.config

Point Zotonic to your Ginger sites/ and modules/ directories:

$ mkdir zotonic/user
$ ln -s ../../ginger/sites zotonic/user/sites
$ ln -s ../../ginger/modules zotonic/user/modules

And run Zotonic:

$ cd ginger
$ make start

See Troubleshooting if you get errors.

You have to enter your account’s sudo password to enable port forwarding (from port 80 to 8000).

First the supporting Docker containers are started, then Zotonic is run. Zotonic is then available on http://localhost.

When you quit Zotonic, the Docker containers are stopped as well.

Sites overview

  • The Zotonic status site is available at http://localhost. Log in with empty password.
  • Make sure to add the hostnames of individual sites (e.g. yoursite.docker.test) to your /etc/hosts file.

Checking out sites

  1. Check out your Zotonic site in the sites/ directory.
  2. Start the site from the status site: http://localhost.
  3. Login and go to the modules page
  4. Deactivate site module and activate it again
  5. Now the site should work properly

Adding modules

Place custom modules in modules/ (no symlinks needed).

Fetching changes

$ git fetch
$ git rebase

Making changes

Commit messages

Please follow the Driebit guidelines for commit messages. Additionally, prefix your message with the module that your change applies to. For instance:

[admin] Fix login form styling
[foundation] Add carousel template

Bugfixes to the release branch

When you are fixing a bug in the current release branch (as it is published on ginger-test or ginger-acceptatie):

  1. Fetch changes: $ git fetch.
  2. View branches: $ git branch -a.
  3. Switch to the latest release branch: $ git checkout release-0.1.0.
  4. Make, commit and push your changes.
  5. Optionally, update ginger-test with the your changes to the release branch:
$ ssh ginger-test.driebit.net
$ cd /srv/zotonic/
$ z git pull
$ z zotonic shell
$ z:m().
  1. Optionally, the release branch to master:
git checkout master
git pull
git merge release-0.#.0 (latest release branch)
git push

Feature developments

When working on (larger) features and fixes that should not be part of the current release:

  1. Fetch changes: $ git fetch.
  2. Switch to master: $ git checkout master.
  3. Make, commit and push your changes.

Deploying sites

To deploy a site, log in to the proper server (ginger-test.driebit.net, ginger-acceptatie.driebit.net or ginger01.driebit.net):

$ ssh ginger-test.driebit.net
$ cd /srv/zotonic/sites/[site name]

Check the current Git branch, then pull the latest changes:

$ z git pull

Then compile the changes and flush the site:

$ z zotonic shell
$ z:compile(), z:flush([site name]).

License

Ginger is released under the Apache 2.0 License. See the included LICENSE file for more information.

ginger's People

Contributors

7eonie avatar casperglorius avatar cdfa avatar cyberoni avatar ddeboer avatar denisebroekman avatar dirklectisch avatar doriend avatar e-weimann avatar elizabethprins avatar githubrow avatar gunnar-driebit avatar james1098 avatar kathleenvw avatar kianmeng avatar linuss avatar loetie avatar m-skipemski avatar mworrell avatar rl-king avatar robvandenbogaard avatar rogierkoppejan avatar thisaccountisnotused avatar yorivanloo avatar yowri 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

Watchers

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

ginger's Issues

Use default image per category

In gitlab by david on Oct 28, 2015, 12:27

For the resource detail header image, use a fallback based on the resource’s category.

Categorieën meenemen in related content

In gitlab by emine on Feb 2, 2016, 11:50

Categorieën kunnen ook interessant zijn om op te relateren. Deze kunnen gelijk aan trefwoorden getoond worden boven gerelateerde content zodat daar ook op gefilterd kan worden. Zou mooi zijn als er bij de opzet van een site gekozen kan worden dit wel of niet toe te passen. (zie ook issue #129 voor toepassing)

Popup dialog for adding new resources while connecting

In gitlab by fred on Nov 18, 2015, 12:01

Currently in ginger edit when making a connection the dialog is usually a finder. Some clients also want to make a new resource while connecting and this will redirect to the new ginger edit page.
This should be a popup dialog with the new resource properties (not just the title)

Properly manage JavaScript vendors

In gitlab by david on Nov 26, 2015, 08:55

We now include JS vendors in our lib folder. A better way is to define them in package.json and include them through a tool like Browserify or Webpack.

We then need to run npm install (and probably gulp) as a deployment step.

@danny Suggestions?

Log search entries to Google Analytics

In gitlab by david on Jan 6, 2016, 16:47

When searching in the top bar using the autosuggestions (before pressing enter). Use JS to log an event when search suggestions are fetched?

See also #117.

Facebook feed

In gitlab by dorien on Dec 17, 2015, 11:34

Facebook feed integration for pages and or groups

Responsive images

In gitlab by david on Nov 12, 2015, 08:34

As discussed on Yammer: we need responsive images.

Proposal:

  • We determine 3 standard image sizes: S, M, L.
  • When we include ({% image ... or {% image_url) a S image, nothing special needs to be done. When we include a M image, we add an S variant (in <imgset) as alternative for smaller screens. When a L image is included, we add S and M variants.
  • The requested image size should be determined from the supplied mediaclass and fall back to width/height if passed to {% image}.

Questions:

  1. Are 3 image sizes enough or do we need more?
  2. Should we add support in Zotonic’s {% image %} tag or should we add a separate {% imgset %} tag?
  3. How do frontenders feel about passing the imgset sizes HTML attribute? Shouldn’t that be in the CSS instead?

If there isn't a player for an uploaded file present it as downloadable

In gitlab by emine on Nov 11, 2015, 12:59

It should be possible to upload file formats that are not supported by our players. These files could be presented as just downloadable instead of directly visible.
If possible there should be a mime type check whether or not it is an accepted file.

[foundation] Image is not (always) displayed

In gitlab by fred on Nov 16, 2015, 14:43

Currently there a too many confusing ways to add images to a page.
depiction, hasbanner, header or has_icon. Small (<500px) images are not displayed

Some rules:

  • An attached image should always be displayed. Either in the masthead or as part of the page content or inline in the text.
  • An image should not be displayed twice on a page
  • If a page has a masthead then the 2nd images should be displayed in the content

carousel: don't move when user selects an item

In gitlab by marco on Dec 1, 2015, 16:18

When I select an item in the carousel, I think it's really annoying if the carousel continues to rotate by itself, defying my explicit wishes. Especially if it does so immediately after I click because the timing happens to coincide.

Automated web tests

In gitlab by david on Nov 19, 2015, 09:31

Testing all our Ginger sites is becoming a major hassle, in particular for @EstherF. Let’s start with end-to-end (black box) web tests. We can always add lower-level (JS) tests later on.

What options do we have for automated web tests?

  • use BDD tools we already know (Behat)
  • use a JS testing tool, such as Jasmine (BDD)
  • Selenium

Any other ideas?

View button

In gitlab by dorien on Apr 15, 2016, 10:42

I would like view button that does not save the page but does view the page how the visitor sees it (i would also like to be able to cmd click it so it opens another tab)

This is also a wish of JHM because if you click save and view you get to be the last editor when i haven't edited anything.

Automatic recompilation

In gitlab by david on Nov 30, 2015, 09:44

Zotonic relies on inotify or fswatch to provide automatic code recompilation.

  • This works fine for our /opt/zotonic directory: $ apt-get install inotify-tools and restart Zotonic.
  • But it doesn’t work for /vagrant/sites|modules because /vagrant is mounted through NFS.

Idea: configure a save-hook in our IDEs (PHPStorm to begin with) and trigger a new Zotonic API service call that recompiles the changed file. The file will end up in /opt/zotonic/ebin and from there the Zotonic filewatcher will pick up to hotload the compiled .beam file and/or restart or flush the site if observers/templates are added.

Auto-suggest related resources through named entity recognition (NER)

In gitlab by david on Mar 21, 2016, 17:23

In admin, parse resource body text and recognise keywords in Ginger. Then based on those resources, automatically suggest related resources. Content editors can then accept/reject the suggestions. When they accept, create an outgoing edge to the selected resource(s).

For parsing the text:

Also needs some UI work where editors can accept/reject suggestions.

/cc @emine @fred

Add 'concept status' to pages

In gitlab by emine on Nov 16, 2015, 15:30

Een extra stap in publiceer-proces. Naast de publish-checkbox zou er ook nog een concept-status moeten zijn waarin een pagina alleen voor de maker zicht- en bewerkbaar is. Nadat een pagina geen concept meer is kan deze (al dan niet door de maker zelf) gepubliceerd worden.

Documentation

In gitlab by david on Nov 27, 2015, 09:50

Ginger currently is documented – to put it mildly – rather succinctly.

Let’s start documenting the parts that need it the most:

  • ACLs?
  • Ginger releases?
  • ...?

Any other subjects?

photo tagging

In gitlab by emine on Nov 16, 2015, 17:23

photo tagging
foto's taggen door een punt op de foto aan te klikken en een relatie te leggen naar een andere pagina (meestal persoon, maar liefst gewoon configureerbaar) in de site.

New feature - foto tagging

In gitlab by fred on Apr 5, 2016, 15:42

Anymeta had a feature for placing actors on a x,y position in an image. Clients would like to have it in Ginger as well.

  • Since ginger doesn't store data on the edge we could store a JSON blob (with actor ids and x,y coordinates in percentages) in a property of the image resource.
  • For display it would need a CSS/javascript for drawing the tags on top of the image from the JSON data
  • For editing a javascript UI with drop/drag/add/find/delete etc.
  • In the backend controllers for maintaining the list of actors

Maybe http://1stwebdesigner.com/image-tagging-tutorial/ is helpfull

Handle grace logon

In gitlab by david on Sep 24, 2015, 10:01

Toelichting:

Op het moment is het registreren van een nieuwe user zonder cofirmatie. Dit is fijn drempelloos maar nogal onveilig.
Een tussenweg die bestond in anymeta is om de nieuw geregistreerde 1 "grace logon" te geven, de gebruiker moet wel confirmeren bij een vervolg logon poging.
Zo iets zou ook in de nieuw te maken mod_ginger_auth terecht kunnen.

Configuration of "Add" action buttons

In gitlab by fred on Nov 16, 2015, 15:02

It should be possible to configure what can be added to the page by the action buttons.

Per resource options for:

  • what category
  • what predicate
  • optional automatic adding the author
  • optional automatic adding of keywords

all of this should also respect the ACL rules.

Timeline category

In gitlab by david on Nov 23, 2015, 14:56

Should be subcategory of query. Should be able to collection-like contain other items. Most relevant for Encyclopedie Drenthe.

Make foldout height smarter

In gitlab by dorien on Nov 17, 2015, 16:39

De foldout checkt nu of een container 700px hoog is. Als deze 705 hoog is dan wordt de foldout button geactiveerd en kun je em 5 pixels uitschuiven. Dit moeten we wat slimmer maken door te checken of het meer dan zoveel pixels verschilt en dan pas de button neerzetten. Ik zou zeggen dat het iets van 100px mag schelen.

Content-dependent media caption

In gitlab by david on Nov 16, 2015, 20:44

Caption for media (and other related objects) that can differ between referring pages. For instance: an image of a tree that is shown

  • on the tree page and there labelled: ‘tree example’
  • on the nature page and there labelled: ‘nature giving way’.

Zotonic will not have edge properties so we have to solve this issue by introducing an intermediary object (with is_dependent=true). The question is how to make this as easy as possible for admin users.

Drents Archief needs this. Any other clients as well?

Semantic browser

In gitlab by fred on Mar 22, 2016, 14:40

Voorstel om een template te maken wat in een linker kolom de inkomende edges, in het midden de rsc info en rechts de uitgaande edges.

Open source Ginger

In gitlab by david on Apr 19, 2016, 08:41

This is a proposal for open sourcing Ginger.

Steps

  1. Migrate Ginger repository to GitHub. Why GitHub?

    • GitHub is the place developers look for software, so having Ginger there raises awareness of both Ginger and Driebit.
    • Third parties can collaborate without having to create an account at our private GitLab.
    • Eases collaboration with Zotonic through cross-referencing issues.
    • Everything is public, including the milestones. Though our issues can be technical, at least in principle clients can follow issues and see when milestones will be released.
  2. Make sure all Driebit members have an account on GitHub and know it’s the new place to report issues.

  3. Automatically update separate, stand-alone repositories for each Ginger module.

    • Preferably run a Docker container with one of the existing webhooks.
    • Configure a GitHub webhook on push that splits each module.
  4. Communicatie vision and improve documentation.

    Open sourcing means more than just making available publicly. A successful open source project needs documentation and a vision.

Questions

  • All code and issues will become public. Does anyone feel this is a problem?
  • Those that do not yet have a GitHub account will need to create one. Is that an issue?
  • Should we place Ginger under the driebit namespace or separately under ginger-cms (already registered)?

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.