Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Running developer’s blog directly from an IDE

Running developer’s blog directly from an IDE

Have you ever experienced starting a new technical blog using one of the most popular blogging platforms and leaving it after writing a single article or two? Have you felt like the initial motivation got lost after a few days or weeks, and getting back on track sounded like mission impossible? Or maybe you have never considered running a blog as an exciting adventure? I hope I can help change your mind. In this presentation, I want to show you an alternative way of running a blog directly from your favorite IDE, using popular tools and techniques that make Open Source projects successful, and hacking your intrinsic motivation to stay on track and continue the journey. You will learn how to start blogging in less than 5 minutes and how to grow incrementally to keep the readers close to you. Last but not least, I will tell my own story of creating a blog where I share my love to Groovy with thousands of readers every week.

Presentation given at GR8Conf EU 2019, Copenhagen, Denmark

Avatar for Szymon Stępniak

Szymon Stępniak

May 28, 2019
Tweet

More Decks by Szymon Stępniak

Other Decks in Technology

Transcript

  1. Running developer’s Running developer’s blog blog directly from an IDE

    directly from an IDE* * (* or any text editor of your choice) @wololock 
  2. I am driven by software I am driven by software

    development development So what if I use…
  3. What if I could What if I could blog blog

    using my using my IDE and favorite tools? IDE and favorite tools?
  4. I want to I want to share share with you…

    with you… what tools I have used to set up the open-source blog 
  5. I want to I want to share share with you…

    with you… what tools I have used to set up the open-source blog how to use these tools in regular blogging  
  6. I want to I want to share share with you…

    with you… what tools I have used to set up the open-source blog how to use these tools in regular blogging why there is no excuse to not learn by blogging   
  7. I want to I want to share share with you…

    with you… what tools I have used to set up the open-source blog how to use these tools in regular blogging why there is no excuse to not learn by blogging how to become rich through blogging    
  8. Hello, my name is Szymon Stepniak I blog @ Continuous

    Delivery Architect @ Torun Java User Group founder @wololock e.printstacktrace.blog  whoami whoami
  9. What does "blogging What does "blogging from IDE from IDE"

    " exactly mean? exactly mean? Let’s explore the main ingredients
  10. The The source code source code Blog as a code

    means that everything is a source code…   
  11. ••• $ tree -a -L 1 . . ├── cache

    ├── _config.yml ├── deploy.sh ├── .git ├── .gitignore ├── node_modules ├── package.json ├── README.md ├── scaffolds ├── scripts ├── .snyk ├── source ├── themes ├── .travis.yml └── wololock.github.io.iml 7 directories, 8 files $
  12. ••• $ tree -a -L 1 . . ├── cache

    ├── _config.yml ├── deploy.sh ├── .git ├── .gitignore ├── node_modules ├── package.json ├── README.md ├── scaffolds ├── scripts ├── .snyk ├── source ├── themes ├── .travis.yml └── wololock.github.io.iml 7 directories, 8 files $
  13. ••• $ tree -a -L 1 . . ├── cache

    ├── _config.yml ├── deploy.sh ├── .git ├── .gitignore ├── node_modules ├── package.json ├── README.md ├── scaffolds ├── scripts ├── .snyk ├── source ├── themes ├── .travis.yml └── wololock.github.io.iml 7 directories, 8 files $
  14. ••• $ tree -a -L 1 . . ├── cache

    ├── _config.yml ├── deploy.sh ├── .git ├── .gitignore ├── node_modules ├── package.json ├── README.md ├── scaffolds ├── scripts ├── .snyk ├── source ├── themes ├── .travis.yml └── wololock.github.io.iml 7 directories, 8 files $
  15. ••• $ tree -L 3 themes themes └── mytheme ├──

    _config.yml ├── layout │ ├── 404.jade │ ├── archive.jade │ ├── category.jade │ ├── clean.jade │ ├── index.jade │ ├── page.jade │ ├── partial │ ├── post.jade │ └── tag.jade └── source ├── css ├── img └── js 7 directories, 9 files $
  16. ••• $ tree -L 3 themes themes └── mytheme ├──

    _config.yml ├── layout │ ├── 404.jade │ ├── archive.jade │ ├── category.jade │ ├── clean.jade │ ├── index.jade │ ├── page.jade │ ├── partial │ ├── post.jade │ └── tag.jade └── source ├── css ├── img └── js 7 directories, 9 files $
  17. ••• $ tree -L 3 themes themes └── mytheme ├──

    _config.yml ├── layout │ ├── 404.jade │ ├── archive.jade │ ├── category.jade │ ├── clean.jade │ ├── index.jade │ ├── page.jade │ ├── partial │ ├── post.jade │ └── tag.jade └── source ├── css ├── img └── js 7 directories, 9 files $
  18. ••• $ tree -L 4 --matchdirs -P "*.adoc" -P "*2019/0[3,4]*"

    --prune source/ source └── _posts └── 2019 ├── 03 │ ├── groovy-regular-expressions-the-definitive-guide.adoc │ ├── installing-graalvm-ee-1-0-0-rc14-with-sdkman.adoc │ ├── intellij-idea-git-gpg-failed-to-sign-the-data.adoc │ ├── pragmatic-thinking-and-learning-book-review.adoc │ └── release-it-2nd-edition-book-review.adoc └── 04 ├── debugging-teams-book-review.adoc ├── graalvm-heap-size-of-native-image-how-to-set-it.adoc ├── spock-random-order-of-tests-how-to.adoc └── using-the-same-prefix-with-different-http-methods-in-ratpack 4 directories, 9 files $
  19. ••• $ tree -L 4 --matchdirs -P "*.adoc" -P "*2019/0[3,4]*"

    --prune source/ source └── _posts └── 2019 ├── 03 │ ├── groovy-regular-expressions-the-definitive-guide.adoc │ ├── installing-graalvm-ee-1-0-0-rc14-with-sdkman.adoc │ ├── intellij-idea-git-gpg-failed-to-sign-the-data.adoc │ ├── pragmatic-thinking-and-learning-book-review.adoc │ └── release-it-2nd-edition-book-review.adoc └── 04 ├── debugging-teams-book-review.adoc ├── graalvm-heap-size-of-native-image-how-to-set-it.adoc ├── spock-random-order-of-tests-how-to.adoc └── using-the-same-prefix-with-different-http-methods-in-ratpack 4 directories, 9 files $
  20. ••• author: Szymon Stepniak bio: Groovista, Upworks Top Rated freelancer,

    Toruń Java User Group founder, photo: language: en timezone: Europe/Warsaw # URL url: root: / permalink: :title/ # Directory source_dir: source public_dir: public tag_dir: tags archive_dir: archives category_dir: categories # Writing new_post_name: :year/:month/:title.adoc default_layout: post titlecase: false ~ https://www.gravatar.com/avatar/b22c1842c6e8f7f2b9b3ed8c0d4efb4d?s=20 https://e.printstacktrace.blog
  21. ••• I love https://sdkman.io/[*_SDKMAN!_*]. It made using multiple different Jav

    comfortable. You can install Java across different versions (from 6 to 13.EA Oracle, Zulu, Corretto or GraalVM CE to name a few). Switching between those a single `sdk use java {version}` command and you are ready to use whatever Java versions are available by default, but luckily, _SDKMAN!_ has a simple ++++ <!-- more --> ++++ == Installing GraalVM EE 1.0.0-RC14 I run some experiments with https://www.graalvm.org/[GraalVM] and the only v _SDKMAN!_ is GraalVM Community Edition. However, there is also GraalVM Enter additional features, like improved performance. The main reason GraalVM EE i that it is distributed over OTN (Oracle Technology Network) only, so you nee and log in to start the file download. OK, so I downloaded *graalvm-ee-1.0.0 successfully. What's next? Let's start with the extracting files from the downloaded archive. [source,bash] ‐‐‐‐ $ tar -xvf graalvm-ee-1.0.0-rc14-linux-amd64.tar.gz ‐‐‐‐
  22. ••• <article role="main" class="blog-post"> <div class="paragraph"> <p>I love <a href="https://sdkman.io/"

    target="_blank" rel="noopener"><s <code>sdk use java {version}</code> command and you are ready to use wha </p> </div> <a id="more"></a> <div class="sect1"> <h2>Installing GraalVM EE 1.0.0-RC14</h2> <div class="sectionbody"> <div class="paragraph"> <p>I run some experiments with <a href="https://www.graalvm.org/ The main reason GraalVM EE is not available in <em>SDKMAN!</em> </p> </div> <div class="listingblock"> <div class="content"> <pre class="highlightjs highlight"> <code class="language-bash hljs" data-lang="bash">$ tar </pre> </div> </div> <div class="paragraph"><p>After extracting all files, we can install </div> </div> </article>
  23. Which Which static site generator static site generator is is

    worth considering? worth considering? Is Hexo the right choice for me?
  24. Let’s summarize Let’s summarize Create Git repository to store the

    source code Pick your favorite format (.md, .adoc, etc.)  
  25. Let’s summarize Let’s summarize Create Git repository to store the

    source code Pick your favorite format (.md, .adoc, etc.) Write a few rst blog posts!   
  26. Let’s summarize Let’s summarize Create Git repository to store the

    source code Pick your favorite format (.md, .adoc, etc.) Write a few rst blog posts! Pick the static site generator of your preference    
  27. Let’s summarize Let’s summarize Create Git repository to store the

    source code Pick your favorite format (.md, .adoc, etc.) Write a few rst blog posts! Pick the static site generator of your preference And have fun!     
  28. ••• # fragment of _config.yml file # Deployment ## Docs:

    deploy: type: git repo: :wololock/wololock.github.io.git branch: master https://hexo.io/docs/deployment.html [email protected]
  29. ••• $ hexo deploy Cloning into '.deploy_git'... ... ... [master

    90a80bb] Site updated: 2019-04-16 14:12:17 167 files changed, 192 insertions(+), 192 deletions(-) rewrite 404.html (63%) rewrite debugging-teams-book-review/index.html (87%) create mode 100644 images/og/debugging-teams2.jpg To 4ac249a..90a80bb HEAD -> master INFO Deploy done: git $ https://github.com/wololock/wololock.github.io.git
  30. ••• $ hexo deploy Cloning into '.deploy_git'... ... ... [master

    90a80bb] Site updated: 2019-04-16 14:12:17 167 files changed, 192 insertions(+), 192 deletions(-) rewrite 404.html (63%) rewrite debugging-teams-book-review/index.html (87%) create mode 100644 images/og/debugging-teams2.jpg To 4ac249a..90a80bb HEAD -> master INFO Deploy done: git $ https://github.com/wololock/wololock.github.io.git
  31. ••• $ hexo deploy Cloning into '.deploy_git'... ... ... [master

    90a80bb] Site updated: 2019-04-16 14:12:17 167 files changed, 192 insertions(+), 192 deletions(-) rewrite 404.html (63%) rewrite debugging-teams-book-review/index.html (87%) create mode 100644 images/og/debugging-teams2.jpg To 4ac249a..90a80bb HEAD -> master INFO Deploy done: git $ https://github.com/wololock/wololock.github.io.git
  32. ••• $ hexo deploy Cloning into '.deploy_git'... ... ... [master

    90a80bb] Site updated: 2019-04-16 14:12:17 167 files changed, 192 insertions(+), 192 deletions(-) rewrite 404.html (63%) rewrite debugging-teams-book-review/index.html (87%) create mode 100644 images/og/debugging-teams2.jpg To 4ac249a..90a80bb HEAD -> master INFO Deploy done: git $ https://github.com/wololock/wololock.github.io.git
  33. ••• language: node_js node_js: - "6" branches: only: - develop

    before_install: - npm install hexo-cli -g - npm install hexo --save - npm install before_script: - git config --global user.name 'Travis CI' - git config --global user.email ' ' - sed -i'' "s~ :wololock/wololock.github.io.githttps://${GH_TOKEN} script: - hexo generate [email protected] [email protected]
  34. ••• before_script: - git config --global user.name 'Travis CI' -

    git config --global user.email ' ' - sed -i'' "s~ :wololock/wololock.github.io.githttps://${GH_TOKEN} script: - hexo generate deploy: skip_cleanup: true provider: script script: sh deploy.sh on: branch: develop ~ ~ ~ ~ .travis.yml [email protected] [email protected]
  35. However, it is However, it is worth worth considering considering

    You just commit, push , and CI server deploys for you 
  36. However, it is However, it is worth worth considering considering

    You just commit, push , and CI server deploys for you You can publish new blog posts from anywhere  
  37. However, it is However, it is worth worth considering considering

    You just commit, push , and CI server deploys for you You can publish new blog posts from anywhere Deploying from CI server might be slower   
  38. A static HTML A static HTML does does doesn’t doesn’t

    require a require a sophisticated sophisticated web web server server Is there anything we should be worry about?
  39. Cloud are offers you… Cloud are offers you… SSL +

    HTTP/2 (for a better performance) 
  40. Cloud are offers you… Cloud are offers you… SSL +

    HTTP/2 (for a better performance) Caching + global CDN  
  41. Cloud are offers you… Cloud are offers you… SSL +

    HTTP/2 (for a better performance) Caching + global CDN Page Rules (a very limited alternative to mod_rewrite )   
  42. Cloud are offers you… Cloud are offers you… SSL +

    HTTP/2 (for a better performance) Caching + global CDN Page Rules (a very limited alternative to mod_rewrite ) Firewall    
  43. Cloud are offers you… Cloud are offers you… SSL +

    HTTP/2 (for a better performance) Caching + global CDN Page Rules (a very limited alternative to mod_rewrite ) Firewall Web traf c analytics     
  44. Cloud are offers you… Cloud are offers you… SSL +

    HTTP/2 (for a better performance) Caching + global CDN Page Rules (a very limited alternative to mod_rewrite ) Firewall Web traf c analytics … and much more     
  45. That’s all, folks! Do you have any questions? Handout ,

    slides, and all materials are available: https:/ /github.com/wololock/blogging-from-ide Thank you! Thank you!