Difference between pages "Adding an Ebuild to the Wiki" and "Package:Ghost (Blogging Platform)"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
m (remove warnings about approval since that's been removed)
 
 
Line 1: Line 1:
This page describes how to add an official entry for an ebuild to the Funtoo Linux wiki.
{{Ebuild
|Summary=Ghost allows you to write and publish your own blog, giving you the tools to make it easy and even fun to do.
|CatPkg=www-apps/ghost
|Maintainer=anak1n
|Homepage=https://ghost.org
}}


== Goal ==
Ghost is an easy to use, quick, and light blogging platform that uses nodejs and is ready to go in minutes.  You can configure it to do anything from a self hosted blog for yourself, a blog that uses multiple users with their own usernames and profile pages.


Our goal for ebuild wiki pages is ambitious -- the wiki should have complete and excellent documentation for using every ebuild in Portage. If the ebuild exists in your Funtoo Linux Portage tree, and there is no corresponding ebuild page for it, you're encouraged to use these instructions to add a page to the wiki for it.
To use Ghost in production (as opposed to development mode) you simply first run:


== What We Have So Far ==
{{console|body=
###i## emerge ghost
###i## npm install --production
}}


To see what ebuild pages we have so far, see the [[Ebuilds by CatPkg]] page to see if the "CatPkg" (category/package atom) is already on this wiki.  
Then configure your options in {{f|/usr/share/webapps/ghost/config.example.js}} and rename it to {{f|/usr/share/webapps/ghost/config.js}}:
{{file|name=config.js|lang=javascript|desc=ghost config|body=
// # Ghost Configuration
// Setup your Ghost install for various environments
// Documentation can be found at http://support.ghost.org/config/


You can also view all pages having to do with ebuilds (which also includes Package pages themselves) by going to the [[:Category:Ebuilds]] page. Package pages will be listed by their regular wiki page names, which may make them harder to find.
var path = require('path'),
    config;


== The Package Namespace ==
config = {
    // ### Production
    // When running Ghost in the wild, use the production environment
    // Configure your URL and mail settings here
    production: {
        url: 'http://blog.somedomain.com',
        mail: {
            transport: 'SMTP',
            options: {
                service: 'Gmail',
                auth: {
                    user: 'user@gmail.com',
                    pass: 'password'
                }
            }
        },
        database: {
            client: 'sqlite3',
            connection: {
                filename: path.join(__dirname, '/content/data/ghost.db')
            },
            debug: false
        },


This wiki has a special MediaWiki [http://www.mediawiki.org/wiki/Help:Namespaces namespace] called <code>Package</code>, used as a home for wiki pages about ebuilds.. Pages in this namespace have a URL that is prefixed with <code>Package:</code>, such as this wiki page: [[Package:Accelerated AMD Video Drivers]], which is also a good example of a wiki page for an ebuild. View all [[:Category:Ebuilds|ebuild pages here]].
        server: {
            // Host to be passed to node's `net.Server#listen()`
            host: '0.0.0.0',
            // Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT`
            port: '2368'
        }
    }
};


== The Repository Namespace ==
// Export config
module.exports = config;
}}


There is also a special namespace for [[:Category:Repositories|repositories]] -- repositories are collections of ebuilds.
{{note|You don't need to use Gmail as your mail, just an example. E-mail is only used for when you add users to the blog, it sends a notice so they can set up their own username and their own password, or if you forget your password and need to reset.}}


== An Example Ebuild Page ==
After you've completed setting up your {{f|config.js}}, you can start Ghost from:


Let's look at an ebuild page: [[Package:Accelerated AMD Video Drivers]]. You'll notice it has a unique look that is distinct from a regular wiki page.
{{console|body=
###i## npm start --production
}}


There are several other notable things about package pages. Let's take a look at each:
Once you confirm that it has started, you use the URL and port you provided in your browser: {{c|blog.somedomain.com:2368/ghost/signup}}
If you use Gravatar and use the e-mail used for that, it will automatically enable your Gravatar as your users avatar. You can disable this if you'd like by adding the following to your config.js


* As covered earlier, the ebuild is in the Package namespace.
{{file|name=config.js|lang=javascript|desc=ghost config|body=
* The ebuild is in the [[:Category:Ebuilds]] category.
privacy: {
* In the left-hand Tools menu, you can click <code>Browse Properties</code> on an Ebuild page to view its queryable semantic properties.
    useGravatar: false
* There is an infobox in the upper-right corner that lists current ebuild maintainer, and the source repository to which it belongs, as well as its official CatPkg name.
}
}}


'''One of the most important things to note about this Ebuild page is the name of the wiki page itself.''' Rather than being named <code>x11-drivers/ati-drivers</code>, as the ebuild is identified in the Portage tree, it has a regular English name as the wiki page name. Some ebuilds, like the [[Package:Nginx]] page, have the regular package name as the wiki page name. The general rule for naming ebuild pages is that they should be named as a regular wiki page, with a descriptive English name in the Package namespace. The Package namespace (as well as being part of the [[:Category:Ebuilds]] category) indicates that this page is about a Package (ebuild.)
After this is all done, you can start using your blog. To use it you go to the domain your provided in {{c|config.js}}: {{c|blog.somedomain.com:2368/ghost}} and you will be able to publish, write drafts, and edit any posts.  


The rationale for this convention is to improve discoverability of these pages via search engines, and to align with wiki page conventions. The CatPkg is stored as semantic data so it is still possible to find the page using its traditional package atom.
{{EbuildFooter}}
 
== Semantic Data ==
 
The following semantic data is stored for each Package page:
 
* [[Property:CatPkg|CatPkg]] (string) - the canonical name (catpkg atom) for the package in its overlay or repository.
* [[Property:Maintainer|Maintainer]] (Page) - a link to the maintainer(s) of this package (if the user has a User page, it will link there.) Important for forked ebuilds. Can be left blank.
* [[Property:Repository|Repository]] (Page) - a link to the repository from which this ebuild is sourced. This can be an overlay or a full Portage tree. This information is filled out automatically.
* [[Property:Summary|Summary]] (Text) - a short summary, typically a sentence, that describes the functionality of the ebuild.
 
To extract some of this information:
example extraction of gnome mastermind's information
<console>$##i## equery m games-board/gnome-mastermind</console>
<console>$##i## cat /usr/portage/games-board/gnome-mastermind/gnome-mastermind-*.ebuild | grep DESCRIPTION</console>
 
== Creating a Package Page ==
 
To add an Ebuild page to the wiki, use the widget below, which will pop up a form to guide you through the creation process. Remember the naming guidelines... If you were creating a wiki page for <code>www-servers/apache</code>, you would probably name the wiki page "Apache" or "Apache Web Server", and ''then'' enter <code>www-servers/apache</code> as the ''CatPkg'' on the form.
 
You will also be prompted for a Summary and Maintainer. The maintainer field will auto-complete, based on Users defined on the wiki. If you don't know the maintainer, leave it blank -- a staff member will fill it in properly for you. Our main goal is to get ''quality documentation'' online, so if you can help with that, fantastic!
 
{{#forminput:form=Ebuild|size=|default value=|button text=Add Package|autocomplete on namespace=Package|remote autocompletion|placeholder=Descriptive name|query string=namespace=Package}}
 
Thanks very much for your contribution to Funtoo Linux documentation!
 
[[Category:Portage]]

Revision as of 08:34, January 19, 2015

Ghost (Blogging Platform)

   Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.


Ghost is an easy to use, quick, and light blogging platform that uses nodejs and is ready to go in minutes. You can configure it to do anything from a self hosted blog for yourself, a blog that uses multiple users with their own usernames and profile pages.

To use Ghost in production (as opposed to development mode) you simply first run:

root # emerge ghost
root # npm install --production

Then configure your options in /usr/share/webapps/ghost/config.example.js and rename it to /usr/share/webapps/ghost/config.js:

   config.js (javascript source code) - ghost config
// # Ghost Configuration
// Setup your Ghost install for various environments
// Documentation can be found at http://support.ghost.org/config/

var path = require('path'),
    config;

config = {
    // ### Production
    // When running Ghost in the wild, use the production environment
    // Configure your URL and mail settings here
    production: {
        url: 'http://blog.somedomain.com',
        mail: {
            transport: 'SMTP',
            options: {
                service: 'Gmail',
                auth: {
                    user: 'user@gmail.com',
                    pass: 'password'
                }
            }
        },
        database: {
            client: 'sqlite3',
            connection: {
                filename: path.join(__dirname, '/content/data/ghost.db')
            },
            debug: false
        },

        server: {
            // Host to be passed to node's `net.Server#listen()`
            host: '0.0.0.0',
            // Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT`
            port: '2368'
        }
    }
};

// Export config
module.exports = config;
   Note

You don't need to use Gmail as your mail, just an example. E-mail is only used for when you add users to the blog, it sends a notice so they can set up their own username and their own password, or if you forget your password and need to reset.

After you've completed setting up your config.js, you can start Ghost from:

root # npm start --production

Once you confirm that it has started, you use the URL and port you provided in your browser: blog.somedomain.com:2368/ghost/signup

If you use Gravatar and use the e-mail used for that, it will automatically enable your Gravatar as your users avatar. You can disable this if you'd like by adding the following to your config.js

   config.js (javascript source code) - ghost config
privacy: {
    useGravatar: false
}

After this is all done, you can start using your blog. To use it you go to the domain your provided in config.js: blog.somedomain.com:2368/ghost and you will be able to publish, write drafts, and edit any posts.