diff --git a/.gitignore b/.gitignore index c6faf97..07d8b98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ reporting/reporting reporting/output -.idea \ No newline at end of file +.idea +.DS_Store diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..0f2371f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,53 @@ +# Contributing to the Gno Blog + +Thank you for considering a contribution to the Gno Blog. We appreciate all and every open-source contribution to the Gno.land project, as everything we do revolves around open-source. +Below, you will find guidelines on how to submit a blog post to the Gno Blog. + +If you are unsure about something, please don’t hesitate to reach out for help by opening an issue here, on Discord, or directly to the Gno.land DevRel team. +Likewise, if you have an idea on how to improve this guide, go for it as well. + +### What we are looking for +We’re seeking contributions that will bring value to our growing community of gnomes. If you can bring technical expertise or a different perspective to the table, we want to hear from you. Please ensure your article is written in high-quality text and formatted according to the specifications below. We don’t tolerate plagiarism, excessive self-promotion, link spamming, SEO stuffing, or hate speech. + +Below are topics of particular interest to us, but we’re open to all suggestions, so if you have an idea that’s not on the list, but you believe will make great reading, feel free to submit your story. + +- Web3 news and developments and how they impact our community (e.g. legislation, industry trends, technical advances) +- Gno ecosystem news (e.g. interesting new realms/apps, newly-added core functionality, etc.) +- Technical deep dives (e.g. language comparisons, pros and cons, examining the core stack) +- Tutorials and how-to guides +- Useful intros about basic concepts in Gno.land (e.g. package/realm distinction) +- General content that helps explain reasoning or thought processes (e.g. writing the entire stack in Go vs implementing components in Rust) +- Op-ed pieces and alternative views (e.g. building effective governance, decentralizing social media, the importance of censorship-resistant tools) + +### Contribution process + +If you've considered the previous section and would like to contribute to the Gno Blog, here are the steps to follow: +- Write a blog post you'd like to see included to the Gno Blog, while strictly following the [Style Guide](#gno-blog-style-guide). +- Submit a PR using [this template](https://github.com/gnolang/blog/pull/35), while following the structure of the folders & naming, as shown in the example blog post. +- Ping the Gno.land DevRel team, [@waymobetta](https://github.com/waymobetta) and [@leohhhn](https://github.com/leohhhn) for a review. + +After your blog post passes the review process, it will be merged into the `main` branch and shortly after deployed on-chain. + +## Gno Blog Style Guide + +This style guide offers rules and preferences for contributing to the Gno Blog. +Below are some rules to follow when writing a blog post. + +1. All Gno Blog posts are written in standard Markdown. Follow the formatting for headers, links, bold, italic, strikethrough, etc. as you usually would. +2. Check your content for spelling and grammatical mistakes before submitting. +3. Use the Oxford comma. +4. Make sure the target reader is addressed consistently. +5. Make sure the product, company, tech, and other names are accurate. +6. Fact-check your content. +7. If your post contains images, please add a `src` folder to contain them, and link to them in Markdown. +8. Include front-matter in your blog post, detailing the following: + 1. Title + 2. Publication date + 3. Slug + 4. [Tags](#tags) + 5. Authors + +#### Tags +Tags, or [hashtags](https://en.wikipedia.org/wiki/Hashtag), should be lowercase and without spaces; eg, #foobar NOT #FooBar. + +If you're unsure of how to style or format something, take a look at the [example blog post PR](https://github.com/gnolang/blog/pull/35) or review the other [blog posts in this repo](posts) for inspiration; as a last resort, message [@waymobetta](https://github.com/waymobetta) or [@leohhhn](https://github.com/leohhhn) for help within your PR or issue thread. diff --git a/README.md b/README.md index 2f21d41..676bf68 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,10 @@ powered by the [`p/demo/blog` library](https://github.com/gnolang/gno/tree/maste The blog posts are written in markdown format, and include a frontmatter prefix to define metadata. +## Contributing a blog post + +See [CONTRIBUTING.md](./CONTRIBUTING.md). + ## CLI ([`./gnoblog-cli`](./gnoblog-cli)) _See [#1](https://github.com/gnolang/blog/issues/1)_ diff --git a/Test Blog Post b/Test Blog Post deleted file mode 100644 index 76f6775..0000000 --- a/Test Blog Post +++ /dev/null @@ -1 +0,0 @@ -This is a test blog post diff --git a/gnoblog-cli/client.go b/gnoblog-cli/client.go index c3740df..c1d01b8 100644 --- a/gnoblog-cli/client.go +++ b/gnoblog-cli/client.go @@ -6,7 +6,7 @@ import ( "context" "flag" "fmt" - "io/ioutil" + "io" "log" "os" "strings" @@ -96,7 +96,7 @@ func run(args []string) error { } if !opts.Debug { - log.SetOutput(ioutil.Discard) + log.SetOutput(io.Discard) } if err := root.Run(context.Background()); err != nil { diff --git a/gnoblog-cli/post.go b/gnoblog-cli/post.go index 721954b..4b0dda3 100644 --- a/gnoblog-cli/post.go +++ b/gnoblog-cli/post.go @@ -3,6 +3,7 @@ package main import ( "fmt" "io" + "strings" "time" "github.com/adrg/frontmatter" @@ -24,6 +25,18 @@ func parsePost(reader io.Reader) (*post, error) { return nil, fmt.Errorf("invalid post: %w", err) } p.Body = string(rest) + p.Tags = removeWhitespace(p.Tags) return &p, nil } + +// removeWhitespace loops over a slice of tags (strings) and truncates each tag +// by removing whitespace +// ie, []string{"example spaced tag"} -> []string{"examplespacedtag"} +func removeWhitespace(tags []string) []string { + for index, tag := range tags { + tags[index] = strings.Replace(tag, " ", "", -1) + } + + return tags +} diff --git a/posts/2023-09-29_gnomobile/README.md b/posts/2023-09-29_gnomobile/README.md index b6aa4f6..a34b60e 100644 --- a/posts/2023-09-29_gnomobile/README.md +++ b/posts/2023-09-29_gnomobile/README.md @@ -21,9 +21,8 @@ Simply put, GnoMobile is a framework for developing Gno mobile applications. Thi For communication between the mobile app and the Gno code, GnoMobile uses [gRPC](https://grpc.io/), a well-supported framework that sends and receives Google Protobuf messages. Even though the core Gno code is written in Go, the app code can use React Native, Java, Swift, etc. The following system diagram shows how gRPC is used.
- + ![](https://github-production-user-asset-6210df.s3.amazonaws.com/109347079/267934754-e4da6fec-a586-4ebe-97cc-3b3ad7f79370.jpg)
-. Moving from the bottom to the top, this is how the flow looks: @@ -70,7 +69,7 @@ If you want to add a new message to a blockchain, you need to actually interact Gno nodes run on GnoVMs (gnovm), and for the moment, these are only available on desktops. We believe it is possible to make them available on mobile as well, but we need to find clever ways to overcome the constraints of mobile devices (like putting the apps in the background (iOS), addressing network bandwidth limitations, and so on). 1. Developing a **decentralized push notification service** for *both* mobile and desktop apps. Getting notifications is now a standard (and very important) functionality of centralized apps. Technically, this happens via a central server. Naturally, having a centralized server is not possible for a p2p app, but there are other ways to implement notifications, and we are considering including them in the GnoMobile framework. -2. Making it possible for decentralized apps to **interact with the blockchain even if the network connection is poor or virtually unavailable**. Through the **[Wesh Network** protocol](https://wesh.network/), we are opening up the possibility of using alternative transport mediums to exchange messages between peers in an asynchronous but reliable manner in off-grid environments. Enabling reliable, secure, and censorship-resistant communication is our main cause at Berty Technologies. We want to open the door for p2p users to send messages and interact even in extreme situations or adverse scenarios, and Wesh Network is built specifically for this purpose. It is only natural to make it easier for developers to use it through the GnoMobile framework. +2. Making it possible for decentralized apps to **interact with the blockchain even if the network connection is poor or virtually unavailable**. Through the [**Wesh Network** protocol](https://wesh.network/), we are opening up the possibility of using alternative transport mediums to exchange messages between peers in an asynchronous but reliable manner in off-grid environments. Enabling reliable, secure, and censorship-resistant communication is our main cause at Berty Technologies. We want to open the door for p2p users to send messages and interact even in extreme situations or adverse scenarios, and Wesh Network is built specifically for this purpose. It is only natural to make it easier for developers to use it through the GnoMobile framework. 3. Advancing **edge networking for enhanced blockchain resilience**. Edge networking refers to bringing functionality like computing power or storage closer to the user so that they don't need to travel through the whole Internet to interact with a server. The same edge concept can be applied to bring the necessary services to interact with the blockchain closer to each p2p user. For example, hosting a copy of the blockchain so a user can sync it or even execute smart contracts. Having these fundamental services closer to the p2p users is especially important in the case of mobile apps. We want to offer developers the possibility of taking advantage of the edge networking benefits by allowing them to use, for instance, network address redirections or special HTTP headers in the configuration of their applications. In all honesty, it’s hard not to get excited about all the different possibilities that lie ahead for GnoMobile, but we’re keeping our focus on shipping V1 for now and collecting feedback from the community. After that, well, we hope you’ll stick around to see what happens next!