Giter Club home page Giter Club logo

codingdojo.org's Introduction

Build docker

CodingDojo.org

This repo holds the content for CodingDojo.org and some tools to help you work on the site locally.

Contributing

If you want to contribute, first fork repos :

Then clone your fork and the CodingDojo template:

git clone [email protected]:_your_account_/codingdojo.org.git
cd codingdojo.org

# themes are on a separate project that you need to clone too (don't worry, it's in the `.gitignore` for this repo)
git clone [email protected]:_your_account_/template-hugo-codingdojo themes/template-hugo-codingdojo

This site works with Hugo static site generator which you can either install locally or use through the provided Dockerfile.

Using Hugo locally

Note that the current version of Hugo (0.34 as of this writing) seems to have problems with the way the content is laid out in this repo. Older versions (like 0.26 in the Docker image) work fine.

# serve local files with live-reload
make hugo

Open your browser on http://localhost:1313 and start your favorite editor!

Using Hugo from the docker container

Assuming you have Docker installed, you build an image and run it:

make docker-dev
make hugo

Open your browser on http://localhost:1313 and start your favorite editor!

Content contribution

Add new pages

To add content create a new markdown file with this minimal front matter :

---
title: "The title of page"
date: "YYYY-MM-DD"
---

and submit a pull request.

To add a dojo session add your content in content/dojo/ directory, to add a new kata, use content/kata/ directory.

Translation

To translate a page, add a page named MyPage.LANG.md for exemple the french translation of FizzBuzz kata FizzBuzz.md is located in file FizzBuzz.fr.md

Special notes

Summaries

By default the engine will take the first 70s words of some content and use it as a summary. If you want to specify the summary part of your content, you just have to add this comment within your markdown content to define where the summary stops (from the beginning):

<!--more-->

(exactly like this, without spaces around more)

People

If you have an old page here (for your dojo, for yourself in people, etc) and want it to be removed without having to clone/install, just open an issue and ask for the removal. Other option, make a Pull Request.

codingdojo.org's People

Contributors

alexis-benoist avatar alvarobrey avatar benoit-maurice avatar bkimminich avatar chabotsi avatar codenjoyme avatar dvrensk avatar edwarddunn avatar ethanstrominger avatar etiennecharignon avatar ezisazis avatar jibe-b avatar liberatr avatar lucaminudel avatar moonshinedev avatar nathanbwright avatar oalbiez avatar onnadi-work avatar ponsfrilus avatar rhwy avatar ricardogarfe avatar shammer64 avatar tclavier avatar the-it avatar thearunster avatar upsd avatar vikashanumegowda avatar webpapaya avatar yaf avatar zefram-cochrane 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  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codingdojo.org's Issues

Cannot set up environment (OSX 10.13.2)

I guess this is more of a meta-issue, but I don't know where I should take it. I want to submit a couple of PRs, but I want to make sure that I've done things right before submitting them, and I cannot replicate the environment. I've tried it three ways:

1. Following instructions

Cloning works fine. I can also start hugo server -w and go to the start page, but any link I click on that page gives a 404 (for instance "What Is Coding Dojo" leads to http://localhost:1313/WhatIsCodingDojo which only says 404 page not found).

2. Generating the static site

Checking the Dockerfile I learn that the site can be generated statically using hugo --destination=/tmp/www. Running that gives me the following output

$ hugo --destination=/tmp/www

                   | EN   
+------------------+-----+
  Pages            | 217  
  Paginator pages  |   0  
  Non-page files   |   0  
  Static files     |   1  
  Processed images |   0  
  Aliases          |   2  
  Sitemaps         |   1  
  Cleaned          |   0  

Total in 123 ms

but looking in /tmp/www I see a lot less than 217 files:

$ tree /tmp/www
/tmp/www
├── categories
│   ├── index.html
│   └── index.xml
├── css
│   └── codingdojo.css
├── greetings
│   └── index.html
├── home
│   └── index.html
├── index.html
├── index.xml
├── sitemap.xml
└── tags
    ├── index.html
    └── index.xml

5 directories, 10 files

3. Using Docker

Assuming that something is wrong with my hugo installation, I install a modern Docker (I haven't used it for two years) and run it. After many iterations, changing config.toml and nginx_vhost.conf a bit, I have something I can use:

diff --git i/config.toml w/config.toml
index 2262eb9..7f95455 100644
--- i/config.toml
+++ w/config.toml
@@ -3,5 +3,5 @@ baseurl = "http://codingdojo.org/"
 title = "Coding Dojo"
 theme = "template-hugo-codingdojo"
 metadataformat = "yaml"
-canonifyurls = true
+canonifyurls = false
 disablePathToLower = true
diff --git i/nginx_vhost.conf w/nginx_vhost.conf
index 6fb91bb..172c73b 100644
--- i/nginx_vhost.conf
+++ w/nginx_vhost.conf
@@ -1,7 +1,8 @@
 server {
   root /var/www;
   index index.html index.htm;
-  server_name localhost codingdojo.org www.codingdojo.org;
+  listen 1080;
+  server_name local.codingdojo.org localhost codingdojo.org www.codingdojo.org;
 
   if (!-f $request_filename) {
     rewrite ^/cgi-bin/index.pl /$args? permanent;

Building and running the VM:

$ docker build .
Sending build context to Docker daemon   2.16MB
[...]
Step 5/6 : run cd /site && /usr/bin/hugo --destination=/var/www
 ---> Running in 038871fcdd6e
Started building sites ...
Built site for language en:
0 draft content
0 future content
0 expired content
211 regular pages created
16 other pages created
0 non-page files copied
0 paginator pages created
0 tags created
0 categories created
total in 674 ms
Removing intermediate container 038871fcdd6e
 ---> 6b2adb5460e3
Step 6/6 : add nginx_vhost.conf /etc/nginx/conf.d/codingdojo.conf
 ---> 9b83de072f94
Successfully built 9b83de072f94

$ docker run  -p 1080:1080 -rm -d 9b83de072f94
...

After adding 127.0.0.1 local.codingdojo.org to /etc/hosts I can see all the content at port 1080. Yay!

Findings

I think the problem is that hugo has moved on in an incompatible manner. The container runs version 0.26:

# hugo version
Hugo Static Site Generator v0.26 linux/amd64 BuildDate: 2017-11-13T18:45:19Z

but homebrew installed 0.34 on my Mac. The Hugo docs talk about putting all content in folders, but that's not how this repo is laid out.

Again, I'm sorry to use this as a support forum, and I'll be happy to use any knowledge gained to improve the README or start building the wiki.

Ideas

Option 1: I'm thinking of picking up some Docker skills and create another VM that will run hugo server -w rather than using nginx. Hopefully I can do it without touching any of the existing files.
Option 2: Migrating the repo to current Hugo standards (if that is indeed what's wrong). It might mean losing the wiki-like naming/structure (but of course there have to be aliases to maintain all old links).

Has anyone tried this? Does anyone have preferences? And who calls the shots?

Clean up titles

Every title (and text) that is linked to something is still in Wiki style with all words in Pascal Case.

we should correct at least the titles that appear in the pages.

Better instructions for adding a dojo

Sorry, can't understand your instructions at all. Please add our dojo (I just coped and pasted someone else's raw file):


title: "AustinSWCDojo"
draft: false
date: "2018-12-07T11:00:00"
aliases:

  • "/AustinSWCDojo"

The Austin Software Craftsmanship Meetup holds a Coding 

Dojo once a quarter (next dojo Jan 2019). We use
[Cyber-Dojo] as a platform in order to support
multiple languages and test frameworks. Join us
on [Meetup] for more info.

Our dojo is run "Glasgow style," with pairs working together
on their own laptops, all on the same kata but not necessarily
all on the same language. Open to all experience levels;
if you're interested in improving your craft, we want you!

Availability via HTTPS

It would be nice to have codingdojo.org available via HTTPS. I don't know where the page is hosted, but having Nginx mentioned in the configuration files suggests that https://letsencrypt.org/ could be an option.

better readme

  • Be more precise on the "how to start"
  • Reorganize content

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.