| <!DOCTYPE html> |
| <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> |
| <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> |
| <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> |
| <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--><head> |
| <meta charset='utf-8'/><meta http-equiv='X-UA-Compatible' content='IE=edge'/><meta name='viewport' content='width=device-width, initial-scale=1'/><meta name='keywords' content='groovy, blog'/><meta name='description' content='This post looks at the steps to create a blog post.'/><title>The Apache Groovy programming language - Blogs - Creating a Groovy Blog Post</title><link href='../img/favicon.ico' type='image/x-ico' rel='icon'/><link rel='stylesheet' type='text/css' href='../css/bootstrap.css'/><link rel='stylesheet' type='text/css' href='../css/font-awesome.min.css'/><link rel='stylesheet' type='text/css' href='../css/style.css'/><link rel='stylesheet' type='text/css' href='https://cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.css'/> |
| </head><body> |
| <div id='fork-me'> |
| <a href='https://github.com/apache/groovy'> |
| <img style='position: fixed; top: 20px; right: -58px; border: 0; z-index: 100; transform: rotate(45deg);' src='/img/horizontal-github-ribbon.png'/> |
| </a> |
| </div><div id='st-container' class='st-container st-effect-9'> |
| <nav class='st-menu st-effect-9' id='menu-12'> |
| <h2 class='icon icon-lab'>Socialize</h2><ul> |
| <li> |
| <a href='https://groovy-lang.org/mailing-lists.html' class='icon'><span class='fa fa-envelope'></span> Discuss on the mailing-list</a> |
| </li><li> |
| <a href='https://twitter.com/ApacheGroovy' class='icon'><span class='fa fa-twitter'></span> Groovy on Twitter</a> |
| </li><li> |
| <a href='https://groovy-lang.org/events.html' class='icon'><span class='fa fa-calendar'></span> Events and conferences</a> |
| </li><li> |
| <a href='https://github.com/apache/groovy' class='icon'><span class='fa fa-github'></span> Source code on GitHub</a> |
| </li><li> |
| <a href='https://groovy-lang.org/reporting-issues.html' class='icon'><span class='fa fa-bug'></span> Report issues in Jira</a> |
| </li><li> |
| <a href='http://stackoverflow.com/questions/tagged/groovy' class='icon'><span class='fa fa-stack-overflow'></span> Stack Overflow questions</a> |
| </li><li> |
| <a href='http://groovycommunity.com/' class='icon'><span class='fa fa-slack'></span> Slack Community</a> |
| </li> |
| </ul> |
| </nav><div class='st-pusher'> |
| <div class='st-content'> |
| <div class='st-content-inner'> |
| <!--[if lt IE 7]> |
| <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> |
| <![endif]--><div><div class='navbar navbar-default navbar-static-top' role='navigation'> |
| <div class='container'> |
| <div class='navbar-header'> |
| <button type='button' class='navbar-toggle' data-toggle='collapse' data-target='.navbar-collapse'> |
| <span class='sr-only'></span><span class='icon-bar'></span><span class='icon-bar'></span><span class='icon-bar'></span> |
| </button><a class='navbar-brand' href='../index.html'> |
| <i class='fa fa-star'></i> Apache Groovy |
| </a> |
| </div><div class='navbar-collapse collapse'> |
| <ul class='nav navbar-nav navbar-right'> |
| <li class=''><a href='https://groovy-lang.org/learn.html'>Learn</a></li><li class=''><a href='https://groovy-lang.org/documentation.html'>Documentation</a></li><li class=''><a href='/download.html'>Download</a></li><li class=''><a href='https://groovy-lang.org/support.html'>Support</a></li><li class=''><a href='/'>Contribute</a></li><li class=''><a href='https://groovy-lang.org/ecosystem.html'>Ecosystem</a></li><li class=''><a href='/blog'>Blog posts</a></li><li class=''><a href='https://groovy.apache.org/events.html'></a></li><li> |
| <a data-effect='st-effect-9' class='st-trigger' href='#'>Socialize</a> |
| </li><li class=''> |
| <a href='../search.html'> |
| <i class='fa fa-search'></i> |
| </a> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </div><div id='content' class='page-1'><div class='row'><div class='row-fluid'><div class='col-lg-3'><ul class='nav-sidebar'><li><a href='./'>Blog index</a></li><li class='active'><a href='#doc'>Creating a Groovy Blog Post</a></li><li><a href='#_using_the_command_line' class='anchor-link'>Using the command line</a></li><li><a href='#_using_the_github_webui' class='anchor-link'>Using the GitHub WebUI</a></li><li><a href='#_choosing_your_content' class='anchor-link'>Choosing your content</a></li><li><a href='#_next_steps' class='anchor-link'>Next steps</a></li></ul></div><div class='col-lg-8 col-lg-pull-0'><a name='doc'></a><h1>Creating a Groovy Blog Post</h1><p><span>Author: <i>Paul King</i></span><br/><span>Published: 2023-05-25 11:35PM</span></p><hr/><div id="preamble"> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>The Groovy project welcomes contributions from the community |
| on any topics related to Groovy including posts which:</p> |
| </div> |
| <div class="ulist"> |
| <ul> |
| <li> |
| <p>Highlight a feature of the Groovy language which you think deserves additional attention</p> |
| </li> |
| <li> |
| <p>Give details about using Groovy’s tools</p> |
| </li> |
| <li> |
| <p>Give details about using Groovy with other tools, libraries or frameworks</p> |
| </li> |
| <li> |
| <p>Provide advice for new users to Groovy</p> |
| </li> |
| </ul> |
| </div> |
| <div class="paragraph"> |
| <p>As mentioned on the |
| <a href="https://groovy.apache.org/#blogging">Groovy website</a>, |
| you can use your own blogging platform if you wish, |
| or add a post to Groovy’s own |
| <a href="https://groovy.apache.org/blog">blogging site</a>. |
| This post goes into more detail about this second option.</p> |
| </div> |
| <div class="paragraph"> |
| <p>The summary is that writing a blog is easy if you know the basics of |
| <a href="https://asciidoc.org/">Asciidoc</a> and git. |
| A blog is normally just an asciidoc file added to the |
| <a href="https://github.com/apache/groovy-website/tree/asf-site/site/src/site/blog">blog part</a> |
| of the |
| <a href="https://github.com/apache/groovy-website/">apache/groovy-website</a> |
| GitHub repo and maybe an image or two |
| in the corresponding |
| <a href="https://github.com/apache/groovy-website/tree/asf-site/site/src/site/blog/img">image</a> directory.</p> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="_using_the_command_line">Using the command line</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>If you are already familiar with git, first fork the repo using the WebUI. |
| Then clone the repo on the commandline in the normal way:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="prettyprint highlight"><code>$ git clone https://github.com/apache/groovy-website.git</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>Or if you have the <a href="https://cli.github.com/">GitHub CLI</a> tools installed, |
| you can fork and clone in one step using:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="prettyprint highlight"><code>$ gh repo fork https://github.com/apache/groovy-website.git --clone</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>Now create a new <code>.adoc</code> file in the <code>site/src/site/blog/</code> directory. |
| You can edit the file using your favourite text/Asciidoc editor or an IDE. |
| I generally use |
| <a href="https://www.jetbrains.com/idea/">Intellij IDEA</a> |
| with the |
| <a href="https://plugins.jetbrains.com/plugin/7391-asciidoc">Asciidoc plugin</a>.</p> |
| </div> |
| <div class="paragraph"> |
| <p>You’ll want to follow all the normal steps to |
| <a href="https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github">create a pull request on GitHub</a>. This will typically involve |
| creating a branch, committing your new file (and maybe images), |
| pushing your branch to your fork, and then creating the actual PR.</p> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="_using_the_github_webui">Using the GitHub WebUI</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>If you don’t want to install git and an editor/IDE, you can use the WebUI. |
| Simply navigate to the repo, go to the <code>site/src/site/blog/</code> folder, then |
| under <code>Add file</code> click on <code>Create new file</code>. It should look something like |
| the following image:</p> |
| </div> |
| <div class="paragraph"> |
| <p><span class="image"><img src="img/blog_add_file_github.png" alt="Clicking Add file → Create new file"></span></p> |
| </div> |
| <div class="paragraph"> |
| <p>You will be prompted to enter an appropriate name for your file:</p> |
| </div> |
| <div class="paragraph"> |
| <p><span class="image"><img src="img/blog_enter_filename.png" alt="Entering the new file name"></span></p> |
| </div> |
| <div class="paragraph"> |
| <p>You generally pick a unique name that isn’t too long. Here we picked |
| <code>create-groovy-blog.adoc</code>. Don’t get too stressed out about the name, |
| we can provide further guidance once your PR is submitted if your |
| name seems out-of-place compared to existing names. |
| We generally avoid using exotic characters like emojis in the filenames. |
| Some of the tooling doesn’t like such characters.</p> |
| </div> |
| <div class="paragraph"> |
| <p>We now enter Asciidoc content into the file:</p> |
| </div> |
| <div class="paragraph"> |
| <p><span class="image"><img src="img/blog_enter_content.png" alt="Entering some content"></span></p> |
| </div> |
| <div class="paragraph"> |
| <p>The first line is the title for the post. |
| The second line is the author (or authors). |
| The next few lines contain metadata. Your best bet is to copy |
| the metadata from an existing post and change accordingly, but |
| we’ll guide you through any changes if needed once the PR is submitted.</p> |
| </div> |
| <div class="paragraph"> |
| <p>When finished, click on "Commit changes…​":</p> |
| </div> |
| <div class="paragraph"> |
| <p><span class="image"><img src="img/blog_commit_changes_start.png" alt="click commit changes"></span></p> |
| </div> |
| <div class="paragraph"> |
| <p>If you haven’t forked the repository before, you might be prompted |
| to do that now:</p> |
| </div> |
| <div class="paragraph"> |
| <p><span class="image"><img src="img/blog_fork_repository.png" alt="forking the repo"></span></p> |
| </div> |
| <div class="paragraph"> |
| <p>Next, you have the option to override the default commit message |
| and provide an optional extended description if you wish:</p> |
| </div> |
| <div class="paragraph"> |
| <p><span class="image"><img src="img/blog_confirm_commit.png" alt="confirm commit"></span></p> |
| </div> |
| <div class="paragraph"> |
| <p>When ready, click "Propose changes".</p> |
| </div> |
| <div class="paragraph"> |
| <p>You should now see a summary of your pull request.</p> |
| </div> |
| <div class="paragraph"> |
| <p><span class="image"><img src="img/blog_create_pr.png" alt="create pull request"></span></p> |
| </div> |
| <div class="paragraph"> |
| <p>Add a comment if you wish and finally click "Create pull request".</p> |
| </div> |
| <div class="paragraph"> |
| <p>Your PR should now be listed under the repo’s pull requests:</p> |
| </div> |
| <div class="paragraph"> |
| <p><a href="https://github.com/apache/groovy-website/pulls" class="bare">https://github.com/apache/groovy-website/pulls</a></p> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="_choosing_your_content">Choosing your content</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>As mentioned earlier, we welcome a wide range of topics for the posts. |
| Not every topic may be suitable. We need to make sure anything we post |
| conforms with normal copyright restrictions and can be released under |
| the Apache license. Also, we generally don’t want duplicated content |
| or content which is overtly commercial in nature.</p> |
| </div> |
| <div class="paragraph"> |
| <p>If in doubt, it might be good to have a short conversation |
| with the Apache Groovy team on the mailing list or Slack channel |
| before you create your PR. |
| Further details about contacting the team are on the |
| <a href="https://groovy.apache.org/">getting involved</a> page.</p> |
| </div> |
| <div class="paragraph"> |
| <p>If your post takes inspiration from other sites or content, make sure to provide |
| appropriate attribution. Finally, make sure you have some fun writing |
| the post. It will be more enjoyable for you and our readers!</p> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="_next_steps">Next steps</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>The acceptance process might involve several iterations to |
| improve the content.</p> |
| </div> |
| <div class="paragraph"> |
| <p>Your PR, once accepted, will be merged into the repo. |
| At this point, a CI job kicks off and will build a new version of the website. |
| You can watch the CI progress here:</p> |
| </div> |
| <div class="paragraph"> |
| <p><a href="https://ci-builds.apache.org/job/Groovy/job/Groovy%20dev%20website/" class="bare">https://ci-builds.apache.org/job/Groovy/job/Groovy%20dev%20website/</a></p> |
| </div> |
| <div class="paragraph"> |
| <p>And the end result will appear here:</p> |
| </div> |
| <div class="paragraph"> |
| <p><a href="https://groovy.apache.org/blog" class="bare">https://groovy.apache.org/blog</a></p> |
| </div> |
| </div> |
| </div></div></div></div></div><footer id='footer'> |
| <div class='row'> |
| <div class='colset-3-footer'> |
| <div class='col-1'> |
| <h1>Groovy</h1><ul> |
| <li><a href='https://groovy-lang.org/learn.html'>Learn</a></li><li><a href='https://groovy-lang.org/documentation.html'>Documentation</a></li><li><a href='/download.html'>Download</a></li><li><a href='https://groovy-lang.org/support.html'>Support</a></li><li><a href='/'>Contribute</a></li><li><a href='https://groovy-lang.org/ecosystem.html'>Ecosystem</a></li><li><a href='/blog'>Blog posts</a></li><li><a href='https://groovy.apache.org/events.html'></a></li> |
| </ul> |
| </div><div class='col-2'> |
| <h1>About</h1><ul> |
| <li><a href='https://github.com/apache/groovy'>Source code</a></li><li><a href='https://groovy-lang.org/security.html'>Security</a></li><li><a href='https://groovy-lang.org/learn.html#books'>Books</a></li><li><a href='https://groovy-lang.org/thanks.html'>Thanks</a></li><li><a href='http://www.apache.org/foundation/sponsorship.html'>Sponsorship</a></li><li><a href='https://groovy-lang.org/faq.html'>FAQ</a></li><li><a href='https://groovy-lang.org/search.html'>Search</a></li> |
| </ul> |
| </div><div class='col-3'> |
| <h1>Socialize</h1><ul> |
| <li><a href='https://groovy-lang.org/mailing-lists.html'>Discuss on the mailing-list</a></li><li><a href='https://twitter.com/ApacheGroovy'>Groovy on Twitter</a></li><li><a href='https://groovy-lang.org/events.html'>Events and conferences</a></li><li><a href='https://github.com/apache/groovy'>Source code on GitHub</a></li><li><a href='https://groovy-lang.org/reporting-issues.html'>Report issues in Jira</a></li><li><a href='http://stackoverflow.com/questions/tagged/groovy'>Stack Overflow questions</a></li><li><a href='http://groovycommunity.com/'>Slack Community</a></li> |
| </ul> |
| </div><div class='col-right'> |
| <p> |
| The Groovy programming language is supported by the <a href='http://www.apache.org'>Apache Software Foundation</a> and the Groovy community. |
| </p><div text-align='right'> |
| <img src='../img/asf_logo.png' title='The Apache Software Foundation' alt='The Apache Software Foundation' style='width:60%'/> |
| </div><p>Apache® and the Apache feather logo are either registered trademarks or trademarks of The Apache Software Foundation.</p> |
| </div> |
| </div><div class='clearfix'>© 2003-2023 the Apache Groovy project — Groovy is Open Source: <a href='http://www.apache.org/licenses/LICENSE-2.0.html' alt='Apache 2 License'>license</a>, <a href='https://privacy.apache.org/policies/privacy-policy-public.html'>privacy policy</a>.</div> |
| </div> |
| </footer></div> |
| </div> |
| </div> |
| </div> |
| </div><script src='../js/vendor/jquery-1.10.2.min.js' defer></script><script src='../js/vendor/classie.js' defer></script><script src='../js/vendor/bootstrap.js' defer></script><script src='../js/vendor/sidebarEffects.js' defer></script><script src='../js/vendor/modernizr-2.6.2.min.js' defer></script><script src='../js/plugins.js' defer></script><script src='https://cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.js'></script><script>document.addEventListener('DOMContentLoaded',prettyPrint)</script><script> |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
| |
| ga('create', 'UA-257558-10', 'auto'); |
| ga('send', 'pageview'); |
| </script> |
| </body></html> |