Elvis Miranda

Elvis Miranda

1567478489

VuePress: Documentation Made Easy

Enter VuePress

When first hearing of VuePress, one might be tempted to guess that it is an amalgamation of Vue.js and WordPress. Instead, you should think of VuePress as:

Vue.js + Printing Press

Because when all is said and done, VuePress is a static site generator!

Some of you might be thinking, “Wait. Another static site generator? What’s the big deal?”

While there are a number of tools that are static site generators, VuePress stands out from amongst the pack for a single reason: its primary directive is to make it easier for developers to create and maintain great documentation for their projects.


Why Is VuePress So Powerful For Creating Documentation?

The answer is simple. It was designed with one goal in mind: to help developers create great documentation sites while maintaining a fun authoring experience. This means that it provides a framework for developers to:

  • Create beautiful documentation sites,
  • Come with pre-built features essential to all documentation sites,
  • Optimize the authoring experience to make it as simple as updating a Markdown file.


VUEPRESS CAN CO-EXIST WITH YOUR EXISTING CODEBASE

This is one of the main reasons why I strongly recommend it. When it comes to maintaining documentation, one way to guarantee it will go out of date is to make it difficult for developers to update docs when writing code. If you make the authoring experience difficult by forcing developers to update things in two different places, this will cause a lot of friction and often results in documentation getting left to the wayside. This is commonly seen when developers have to maintain a third party tool like a wiki, in addition to the codebase itself.

Because it is a static site generator, this means that it can live in the same exact repo as your code.


A sample application with VuePress docs existing next to a Vue CLI scaffolded app (Large preview)

As you can see in this sample web app structure, your code would live in the src directory as normal, but you would simply have a docs directory to contain all of your documentation. This means you get the benefits of:

  • All documentation is now version controlled;
  • Pull requests can now contain both documentation and code changes;
  • Creating separate scripts for running local instances of your code and docs at the same time;
  • Utilize build pipelines to determine whether new documentation site deployments go in sync with code deployments or not.

THE DEFAULT THEME COMES WITH STANDARD CONFIGURATION

Writing documentation is hard enough as it is, so VuePress offloads a lot of the decisions that one normally has to make and has a bunch of built-in defaults to make your authoring experience easy:

  • Writing content is done primarily with Markdown.
  • This means that you can leverage your existing knowledge of Markdown syntax to style and format your text.

An example of how the Markdown is rendered in VuePress (Large preview)

  • Code syntax highlighting.
  • If you were building a site all on your own, you would need to wrestle with color syntax highlighting libraries. But you’re in luck because you can add code blocks in VuePress is so easy since everything is ready to go with zero configuration.


An example of how code block samples render in VuePress (Large preview)

  • Front matter for defining page-level meta data.
  • Even though you’re authoring in a Markdown file, you can use front matter (like YAML, JSON, or TOML) to define metadata for your page to make it even easier to manage your content!
---
title: Document Like a Pro
lang: en-US
description: Advice for best practices
tags:
  - documentation
  - best practices
---
  • Custom Markdown containers.
  • In case you didn’t know, Markdown has extensions to add even more useful shortcuts to create beautiful UI components like custom containers. And since they are so useful in documentation, VuePress has already configured it so you can use it right out of the box:


A demonstration of custom containers rendered in VuePress (Large preview)

BUILT-IN SEARCH FUNCTIONALITY


Let’s face it. No matter how much time we spend writing great documentation, it will ultimately amount to being useless if the users can’t find it. There are generally two approaches to this:

  1. Wait for search engine robots to slowly crawl your site in hopes that one day your users will be able to find the right page on your site. Not a great solution.
  2. Build your own search functionality, but this can be difficult to implement for static sites as there’s no server-side code running to create search indexes and perform the lookups. Not to mention this is taking development time away from the product itself. So this isn’t great either.

Luckily for us, VuePress is here to save the day once again!

VuePress comes with a built-in search functionality that generates its own “search engine” — you read that right. Without any additional database setup or configuration, VuePress is setup to scrape your entire docs to generate a simple search engine that will surface all of your h1s and h2s to your user.


An example of basic searching in VuePress’ default theme (Large preview)

Now, some of you may be thinking,

“What if I want something that will provide lower-level indexing for searching?”

Well, VuePress has got you covered there too because it is designed to easily integrate with Algolia DocSearch which can provide that functionality to you for free if you meet their requirements:


An example of Algolia DocSearch in action (Large preview)

SIDEBAR NAVIGATION IS AS SIMPLE AS TOGGLING THE FEATURE ON OR OFF

For anyone who has ever been responsible for managing content, you know how complicated it can be to built a sidebar that has nested items and then track what position the reader is on while scrolling down. So, why spend the time on that when you could be writing better docs? With VuePress, the sidebar is as simple as toggling on the front matter for a page:


A demo of how the sidebar can be automatically generated through headings (Large preview)

AUTOMATIC GENERATION OF IMPORTANT META-DATA THAT’S COMMONLY OVERLOOKED

One of the most frustrating things that a user can encounter is out-of-date documentation. When a user follows the steps and has trouble understanding why something doesn’t work, being able to easily find out the last updated date can be incredibly useful to both the user and maintainers of the project.

With a simple configuration, VuePress can ensure automatically output the last updated date on the page so your users always know the last time it was updated.


A screenshot to show the ‘Last Updated’ metadata field (Large preview)

On top of that, with a little bit of configuration, VuePress also makes it incredibly easy for users to contribute to your docs by automatically generating a link at the bottom of every single page that allows users to easily create a pull request to your docs.


A demo of an automatically generated ‘Edit’ link which allows users to easily submit PRs to the docs (Large preview)

It doesn’t get much easier than that for your users.


DEPLOYMENT ON ANY STATIC HOSTING SITE

Since VuePress is a static site generator at its core, this means that you can deploy it on any popular hosting platform such as:

  • Netlify
  • GitHub Pages
  • GitLab Pages
  • Heroku
  • Now


All you need to do to build the site is run vuepress build {{ docsDir }}with where your directory lives and you’ll have everything you need to deploy it live on the web!

NoteFor more in-depth guides on how to do this, check out the official deployment guides for VuePress.


LEVERAGING VUE INSIDE YOUR MARKDOWN FILE

I know, I know. We can use Vue.js in our Markdown?! Yes, you read that right! While technically optional, this is probably one of the most exciting aspects of VuePress because it allows you to enhance your Markdown content like you’ve never been able to do before.

Define Repetitive Data In One Place And Have It Update Everywhere With Interpolation

In the example below, you’ll see a brief example of how you can leverage local variables (like the ones define in the frontmatter) as well as globally defined ones (like the site title):

---
title: My Page Title
author: Ben Hong
---

{{ $page.title }}

Welcome to {{ $site.title }}! My name is {{ $page.author }} and I’ll be your guide for today!



Use Vue Components Within Markdown

I’ll give you a moment to collect yourself after reading this, but yes, live Vue components with a full Vue instance can be yours for the taking if you want! It will take a little bit more work to configure, but this is to be expected since you are creating custom content that will be running in your documentation.

Here is a quick example of what a Counter component would look like in a Markdown file:


A demo of using Vue Components within Markdown (Large preview)

This is perhaps the most powerful part of customization available to documentation since it means you now have the freedom to create custom content extends far beyond the abilities of standard Markdown. So whether it’s providing a demo, or some interactive code, the ideas are endless!


Next Steps

If you want to set up a beautiful documentation site for your users to learn how to use your product, it doesn’t get much easier than VuePress. And even though it might be easy to assume that VuePress should only be used by projects that use Vue.js, this could not be further from the truth. Here are just some examples of the different types of projects leveraging VuePress for their documentation sites:


At the end of the day, regardless of whether you use VuePress or not, I hope this has helped to inspire you to create better documentation for your users.


FURTHER RESOURCES

There are many cool things that I did not cover here in this article (e.g. theming, blogging, and so on), but if you would like to learn more, check out these resources:

Recommended Reading

Creating a To-Do List App with Vue.js & Laravel

Angular vs. React vs. Vue: A performance comparison

Hooks are coming to Vue.js version 3.0

Making the Move from jQuery to Vue

Vue and You

Programming Vue.js Fullpage Scroll

Create a Laravel Vue Single Page App

Vue.js + Vuex Registration and Login Tutorial

Create a Rainbow in Vue

#vue-js #javascript

What is GEEK

Buddha Community

VuePress: Documentation Made Easy

Olivia Green

1595321720

In the era of global internetization, we need to keep up with the times. At the same time, you need to feel safe.Now the most popular electronic document management is in trade. It covers the entire cycle - from the order to the closing of the transaction. Its main advantage is that it greatly simplifies and optimizes the process of buying and selling. Create and automate beautiful workflows with RPA bots without code with airSlate https://www.airslate.com/product/create-and-automate-workflows. Integration with CRM, databases, and other recording systems using hundreds of bots without airSlate code.

Elvis Miranda

Elvis Miranda

1567478489

VuePress: Documentation Made Easy

Enter VuePress

When first hearing of VuePress, one might be tempted to guess that it is an amalgamation of Vue.js and WordPress. Instead, you should think of VuePress as:

Vue.js + Printing Press

Because when all is said and done, VuePress is a static site generator!

Some of you might be thinking, “Wait. Another static site generator? What’s the big deal?”

While there are a number of tools that are static site generators, VuePress stands out from amongst the pack for a single reason: its primary directive is to make it easier for developers to create and maintain great documentation for their projects.


Why Is VuePress So Powerful For Creating Documentation?

The answer is simple. It was designed with one goal in mind: to help developers create great documentation sites while maintaining a fun authoring experience. This means that it provides a framework for developers to:

  • Create beautiful documentation sites,
  • Come with pre-built features essential to all documentation sites,
  • Optimize the authoring experience to make it as simple as updating a Markdown file.


VUEPRESS CAN CO-EXIST WITH YOUR EXISTING CODEBASE

This is one of the main reasons why I strongly recommend it. When it comes to maintaining documentation, one way to guarantee it will go out of date is to make it difficult for developers to update docs when writing code. If you make the authoring experience difficult by forcing developers to update things in two different places, this will cause a lot of friction and often results in documentation getting left to the wayside. This is commonly seen when developers have to maintain a third party tool like a wiki, in addition to the codebase itself.

Because it is a static site generator, this means that it can live in the same exact repo as your code.


A sample application with VuePress docs existing next to a Vue CLI scaffolded app (Large preview)

As you can see in this sample web app structure, your code would live in the src directory as normal, but you would simply have a docs directory to contain all of your documentation. This means you get the benefits of:

  • All documentation is now version controlled;
  • Pull requests can now contain both documentation and code changes;
  • Creating separate scripts for running local instances of your code and docs at the same time;
  • Utilize build pipelines to determine whether new documentation site deployments go in sync with code deployments or not.

THE DEFAULT THEME COMES WITH STANDARD CONFIGURATION

Writing documentation is hard enough as it is, so VuePress offloads a lot of the decisions that one normally has to make and has a bunch of built-in defaults to make your authoring experience easy:

  • Writing content is done primarily with Markdown.
  • This means that you can leverage your existing knowledge of Markdown syntax to style and format your text.

An example of how the Markdown is rendered in VuePress (Large preview)

  • Code syntax highlighting.
  • If you were building a site all on your own, you would need to wrestle with color syntax highlighting libraries. But you’re in luck because you can add code blocks in VuePress is so easy since everything is ready to go with zero configuration.


An example of how code block samples render in VuePress (Large preview)

  • Front matter for defining page-level meta data.
  • Even though you’re authoring in a Markdown file, you can use front matter (like YAML, JSON, or TOML) to define metadata for your page to make it even easier to manage your content!
---
title: Document Like a Pro
lang: en-US
description: Advice for best practices
tags:
  - documentation
  - best practices
---
  • Custom Markdown containers.
  • In case you didn’t know, Markdown has extensions to add even more useful shortcuts to create beautiful UI components like custom containers. And since they are so useful in documentation, VuePress has already configured it so you can use it right out of the box:


A demonstration of custom containers rendered in VuePress (Large preview)

BUILT-IN SEARCH FUNCTIONALITY


Let’s face it. No matter how much time we spend writing great documentation, it will ultimately amount to being useless if the users can’t find it. There are generally two approaches to this:

  1. Wait for search engine robots to slowly crawl your site in hopes that one day your users will be able to find the right page on your site. Not a great solution.
  2. Build your own search functionality, but this can be difficult to implement for static sites as there’s no server-side code running to create search indexes and perform the lookups. Not to mention this is taking development time away from the product itself. So this isn’t great either.

Luckily for us, VuePress is here to save the day once again!

VuePress comes with a built-in search functionality that generates its own “search engine” — you read that right. Without any additional database setup or configuration, VuePress is setup to scrape your entire docs to generate a simple search engine that will surface all of your h1s and h2s to your user.


An example of basic searching in VuePress’ default theme (Large preview)

Now, some of you may be thinking,

“What if I want something that will provide lower-level indexing for searching?”

Well, VuePress has got you covered there too because it is designed to easily integrate with Algolia DocSearch which can provide that functionality to you for free if you meet their requirements:


An example of Algolia DocSearch in action (Large preview)

SIDEBAR NAVIGATION IS AS SIMPLE AS TOGGLING THE FEATURE ON OR OFF

For anyone who has ever been responsible for managing content, you know how complicated it can be to built a sidebar that has nested items and then track what position the reader is on while scrolling down. So, why spend the time on that when you could be writing better docs? With VuePress, the sidebar is as simple as toggling on the front matter for a page:


A demo of how the sidebar can be automatically generated through headings (Large preview)

AUTOMATIC GENERATION OF IMPORTANT META-DATA THAT’S COMMONLY OVERLOOKED

One of the most frustrating things that a user can encounter is out-of-date documentation. When a user follows the steps and has trouble understanding why something doesn’t work, being able to easily find out the last updated date can be incredibly useful to both the user and maintainers of the project.

With a simple configuration, VuePress can ensure automatically output the last updated date on the page so your users always know the last time it was updated.


A screenshot to show the ‘Last Updated’ metadata field (Large preview)

On top of that, with a little bit of configuration, VuePress also makes it incredibly easy for users to contribute to your docs by automatically generating a link at the bottom of every single page that allows users to easily create a pull request to your docs.


A demo of an automatically generated ‘Edit’ link which allows users to easily submit PRs to the docs (Large preview)

It doesn’t get much easier than that for your users.


DEPLOYMENT ON ANY STATIC HOSTING SITE

Since VuePress is a static site generator at its core, this means that you can deploy it on any popular hosting platform such as:

  • Netlify
  • GitHub Pages
  • GitLab Pages
  • Heroku
  • Now


All you need to do to build the site is run vuepress build {{ docsDir }}with where your directory lives and you’ll have everything you need to deploy it live on the web!

NoteFor more in-depth guides on how to do this, check out the official deployment guides for VuePress.


LEVERAGING VUE INSIDE YOUR MARKDOWN FILE

I know, I know. We can use Vue.js in our Markdown?! Yes, you read that right! While technically optional, this is probably one of the most exciting aspects of VuePress because it allows you to enhance your Markdown content like you’ve never been able to do before.

Define Repetitive Data In One Place And Have It Update Everywhere With Interpolation

In the example below, you’ll see a brief example of how you can leverage local variables (like the ones define in the frontmatter) as well as globally defined ones (like the site title):

---
title: My Page Title
author: Ben Hong
---

{{ $page.title }}

Welcome to {{ $site.title }}! My name is {{ $page.author }} and I’ll be your guide for today!



Use Vue Components Within Markdown

I’ll give you a moment to collect yourself after reading this, but yes, live Vue components with a full Vue instance can be yours for the taking if you want! It will take a little bit more work to configure, but this is to be expected since you are creating custom content that will be running in your documentation.

Here is a quick example of what a Counter component would look like in a Markdown file:


A demo of using Vue Components within Markdown (Large preview)

This is perhaps the most powerful part of customization available to documentation since it means you now have the freedom to create custom content extends far beyond the abilities of standard Markdown. So whether it’s providing a demo, or some interactive code, the ideas are endless!


Next Steps

If you want to set up a beautiful documentation site for your users to learn how to use your product, it doesn’t get much easier than VuePress. And even though it might be easy to assume that VuePress should only be used by projects that use Vue.js, this could not be further from the truth. Here are just some examples of the different types of projects leveraging VuePress for their documentation sites:


At the end of the day, regardless of whether you use VuePress or not, I hope this has helped to inspire you to create better documentation for your users.


FURTHER RESOURCES

There are many cool things that I did not cover here in this article (e.g. theming, blogging, and so on), but if you would like to learn more, check out these resources:

Recommended Reading

Creating a To-Do List App with Vue.js & Laravel

Angular vs. React vs. Vue: A performance comparison

Hooks are coming to Vue.js version 3.0

Making the Move from jQuery to Vue

Vue and You

Programming Vue.js Fullpage Scroll

Create a Laravel Vue Single Page App

Vue.js + Vuex Registration and Login Tutorial

Create a Rainbow in Vue

#vue-js #javascript

Sigrid  Farrell

Sigrid Farrell

1624096971

Caching made easy in Spring Boot

Caching is a common practice to improve your system in many ways. It helps to make your system resilient, scalable, fast, and even save some bucks depending on your use case.

If in your database some values are read often then it’s a good idea to cache them. This could be the content of the email that you send to a newly registered user, a catchy banner text that changes every day or the number of hours you ban a user from your system for suspicious activity.

If these are accessed too frequently, you may store them in application properties or even in your code, but then you have to redeploy to make the change effective. These are the type of things which are most likely set by the business team, so if they decide to change something it is an overkill to deploy the application. So you better give them a portal to update these and inside your application you both store them in database and cache such as redis as well.

#redis #caching #cacheable #java #spring #caching made easy in spring boot

Earlene  Rowe

Earlene Rowe

1595593080

Deep Dive into VuePress: Craft a Clean Documentation & Blog

A bit of context for our VuePress project

What’s this side project I’m talking about? Well, it started with a pain any blog editor or webmaster knows too well:

Cringe-worthy outreach emails.

You know the kind of email that praises your blog content and offers some guest posts about real estate… on a WEB DEVELOPMENT platform?!

We thought it was time to put a spotlight on this stinky marketing technique. To do so, we built a simple Hugo static site where anyone can publish anonymous and funny examples of how not to outreach. The name of the site? Outreach Shame.

Note: Outreach Shame isn’t live yet, but it presented us with a good use case to build VuePress documentation. You’ll find real guidelines in the documentation we created (link further down). Follow them to send us your lousy outreach examples; they’ll appear on the site once it goes live.

What is VuePress?

In a few words, VuePress is a minimalistic Vue-powered static site generator.

As mentioned earlier, the original goal behind its design was to generate documentation, but its system also allows you to write a theme for almost anything.

I’ve read in a few places that VuePress is not blog-aware yet. Although it does miss some blogging features out-of-the-box, it’s still well-suited for simple blogs, as you’ll see later on.

VuePress is only a few months old but has already made some waves mainly because it comes directly from the brain behind Vue.js. Let’s see what the man has to say about VuePress:

“It’s special in the sense that it completely uses Vue for its layout and because Vue is a frontend framework it’s actually using a few server-side rendering capabilities to do the static HTML generation. The result is, when you write your layout or your theme for a VuePress site it’s actually a universal application that runs both on the server and on the client.”

The server is skipped though, and every route of the app is virtually rendered to generate static HTML files that load as a Vue.js single page application.

Why should you use VuePress?

As you’re probably aware, there are tons of static site generators out there. So where does VuePress stand out?

→ Its unique use of Markdown & Vue components

VuePress handles the conversion of Markdown to HTML by default which makes generating new content very easy. You can even use Vue components directly in your Markdown files. It allows you to add custom or dynamic features to your website smoothly. Other built-in Markdown features include a YAML front-matter to set predefined variables or create custom ones that VuePress will automatically interpret.

→ Its multi-language support from the get-go

Out-of-the-box, VuePress lets you write several versions of your site in as many languages as you need. (!)

→ Its neat default & custom themes

The least I can say is that the VuePress default theme looks clean. It’ll do the job for any fast implementation of technical documentation. It’s responsive & fully-featured (search capabilities, navbar & sidebar, optional homepage, etc.). Then, customizing the default theme or starting from scratch is simple and fun.

#vuepress #vue #programming

Nigel  Uys

Nigel Uys

1614749601

Creating a Swagger Documented Go Web Server in Two Easy Steps

Setting up a Go web server by using Go Fiber with auto-generated Swagger documentation explained step-by-step.

Setting Up The Web Server From Scratch

So let’s start our Go project from scratch. First, we have to create a new module:

// Create new project folder and 'cd' into it.
$ mkdir medium_go_fiber_swagger && cd medium_go_fiber_swagger

// Create module called `medium_go_fiber_swagger`
$ go mod init medium_go_fiber_swagger

Next, we can already add the  Fiber module to our module/application.

// Install Go Fiber module and add to `go.mod`
$ go get -u github.com/gofiber/fiber/v2

#golang #programming #documentation

What is EasyFi Protocol (EASY) | What is EASY token

EasyFi is a protocol built with a vision to solve some of the inherent challenges faced by gen 1 defi solutions with respect to the transaction speed and cost which are a bottleneck for defi operations at scale.

Secure Protocol to cover up all needs

Micro-Lending

There are billions of people in emerging economies who are working only because of daily time-bound loans of small value, however, these people are exploited by exorbitant interest rates by local financiers. Micro Loans from EasyFi are built for the very purpose of enabling people to draw upon small loans quickly for various purposes, be it their small business, medical emergency, or early salary (In case of various territories where salaries are paid in Crypto).

Under collateralized Loans

Under collateralized Loans are going to be one of the most important innovations of the lending industry to enable strong adoption and trust in decentralized lending. Connected with TrustScore (a decentralized rating mechanism built by Koinfox) EasyFi will enable the community to access billions in the capital that can be allocated efficiently.

Credit Delegation

EasyFi will enable credit delegation as one of its core products for more trust-based loans where both parties either know each other or accept the level of risk by deciding upon the TrustScore of the borrower. The delegation will typically come into play for loans above a certain size, enabling financing of various needs of trusted entities via the protocol.

Credit Default Swaps

CDS, which brings insurance to DeFi, are also going to be an important feature of the protocol enabling suppliers of the loans especially of a certain size, to be able to convert those loans into tradable instruments and sell them to institutional customers who are willing to cover the risk. This enables a simple form of credit insurance of various categories of loans issued on the protocol.

Amazing UI/UX with Gasless Transactions

User onboarding and UX is another Big problem with many of defi protocols. EasyFi will enable frictionless onboarding of users onto it’s platform with inbuilt gasless meta transactions for users enabled by various of it’s ecosystem partner projects.

EARN EASY TOKEN

Yield Farming

EasyFi will enable users to farm it native protocol token “EASY” by interacting with the protocol. Anyone can farm EASY tokens when they interact with the platform. Farmed tokens are distributed on daily basis to the users based on their interaction contribution with the protocol.

source : Crypto Millionaire Academy

Create an Account and Trade NOWBinanceBittrexPoloniex

Looking for more information…

☞ Website
☞ Whitepaper
☞ Social Channel 1
Social Channel 2

Thank for visiting and reading this article! I’m highly appreciate your actions! Please share if you liked it!

#blockchain #bitcoin #easyfi #easy