Giter VIP home page Giter VIP logo

wikimo_content's Introduction

Wikimo Git documentation

This repository stores documentation for https://wiki.mozilla.org/ and in particular the https://wiki.mozilla.org/Security pages. It is possible to both pull existing pages, or changes made to pages directly back to Git as well as commit changes to Git first then push them to the wiki. In any case, the Git repository has authority and, for pages tracked here, it is highly recommended to ensure that your changes are sent via a pull-request.

Please do not change the main repository directly (i.e always fork and send a pull-request, get at least one peer-review and merge).

All documentation is licensed under the MPL (see LICENSE).

Drafting new documentation, or changes to documents

Sometimes, it's a little hard to edit documents directly from Git in your own text editor. When or if that is the case, the currently recommended practice is:

  1. Create a draft in your Wikimo space, such as: https://wiki.mozilla.org/User:Gdestuynder/mydraft a. Optionally: Create an issue in https://github.com/mozilla/wikimo_content/issues to indicate you're working on this. This may be particularly useful if you're going to work on this for a long time to avoid work duplication.
  2. Edit, preview, etc. to your heart's content.
  3. Copy paste the result to Git and push to your local/personal GitHub fork of this very repository
  4. Create a PR (Pull-request) with the new contents and also refer to your Wikimo space for a rendered version.

Usage of the sync.py tool

This tool synchronizes Git to Mediawiki automatically (both ways!) and should be run after you merged commits to GitHub for changes to appear on Mediawiki (or to pull changes from Mediawiki into GitHub!).

Recommended: Install/use virtual envs for Python. See the example below if you've never done that before.

# Place these in your $HOME/.bashrc or favorite shell RC file
# then call 'pyvenv2' or 'pyvenv' when entering the directory with the virtual
# python environment.

# Python 2.x - 3.5
function pyvenv2() {
[ -d venv2 ] || virtualenv2 --no-site-packages venv2
source venv2/bin/activate
}
# Python 3.6+
function pyvenv() {
	[ -d venv ] || python3 -m venv venv
	source venv/bin/activate
}

Install & configure sync.py

$ git clone https://github.com/mozilla/wikimo_content && cd wikimo_content
# <activate your venv>
$ pip install -r requirements.txt
$ cp sync.json.inc sync.json
# <edit sync.json>

Using sync.py

Checking for differences/changes between your local Git copy and Wikimo. Nothing will be written to Wikimo.

$ ./sync.py
# This also shows the unified diff for the pages
$ ./sync.py -d

Push changes - this will write to Wikimo.

$ ./sync.py --push

To sync the wiki back to git (for example when someone forgot to use git... ;-).

$ ./sync.py --get
# To send back to GitHub as well:
$ git commit -a -m "your commit msg here"
$ git push origin master:myfix
# Create a pull-request after this to get your changes integrated upstream

wikimo_content's People

Contributors

amuntner avatar andrewkrug avatar april avatar gdestuynder avatar gene1wood avatar injust avatar jeffbryner avatar jeffwidman avatar jvehent avatar kangsterizer avatar lgarron avatar phrozyn avatar sheeit avatar

Watchers

 avatar

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.