Giter Club home page Giter Club logo

logos-docusaurus-plugins's Introduction

Overview

This repository contains a set of Docusaurus 2 plugins and themes, initially crafted for Logos websites but versatile enough for use with any Docusaurus website. The collection includes a headless local search, OG image generation, and Fathom Analytics plugins.

Quick start

Use a template

Kickstart your website creation with our ready-to-use templates. Choose a template that fits your needs, whether it's a documentation, a blog, or a complete website.

  1. Choose a template:
  1. Clone your selected template:
# Example: Create a website with a landing page
git clone https://github.com/acid-info/logos-homepage-template.git my-website && cd my-website

# Example: Create a documentation website
git clone https://github.com/acid-info/logos-documentation-website-template.git my-website && cd my-website

# Example: create a blog
git clone https://github.com/acid-info/logos-blog-template.git my-website && cd my-website
  1. Install the dependencies:
yarn install
  1. Run your new website locally:
yarn start

Use with an existing Docusaurus website:

  1. Install the Logos Docusaurus preset:
yarn add @acid-info/logos-docusaurus-preset
  1. Add the preset to your docusaurus.config.js:
presets: [
    [
      '@acid-info/logos-docusaurus-preset',
      /** @type {import('@acid-info/logos-docusaurus-preset').PluginOptions} */
      ({
        businessUnit: 'Logos',
      }),
    ],
  ],

Use the playground

A playground located in the packages/docusaurus-playground of this repository can be used to test the plugins and themes locally.

  1. Clone the repository:
git clone https://github.com/acid-info/logos-docusaurus-plugins.git
  1. Install the dependencies:
yarn install && yarn link
  1. Run the playground:
yarn start

Next steps

Working on content

Our plugins work smoothly with standard Docusaurus features, which you can use to manage and organize content. Learn more on the Docusaurus website. For practical guidance on dealing with common use cases, visit our dedicated Wiki pages.

Configuration

While it's possible to install and configure our plugins and themes individually, we highly recommend using the Logos Docusaurus preset for a simplified installation. This preset establishes a default configuration for the plugins and theme and automatically incorporates essential website metadata, logos, and favicons for the selected business unit. For detailed configuration information, please refer to the README file of each package.

Become a contributor

We welcome any kind of contribution, such as reporting issues, suggesting features, writing documentation or fixing bugs. Please read our contributing guidelines on how to get started.

Packages

logos-docusaurus-plugins's People

Contributors

amirhouieh avatar ci-acid-info[bot] avatar jeangovil avatar jinhojang6 avatar jongomez avatar pajicf avatar

Stargazers

 avatar  avatar

logos-docusaurus-plugins's Issues

Navitems jumps when active

In the sidebar and TOC, there is a 1px x-axis jump between two state; active/non-active. So when active and the left border is shown, the item jumps to the right and when non-active (no border left) item shifts back to left (original position).

I think we can solve this by setting border-box correctly.

Enhance the content of README

We need a more elaborative version of README which explains different options and configs either the ones from Docu or the one built into Logos Plugin.

[Feedback] Docs Search Bar

Occasionally, the search feature can be problematic, as illustrated in the following screenshot:

Screenshot 2023-06-22 at 7 57 31 AM

However, in the majority of instances, the search functionality works perfectly fine. It's worth noting that this issue is infrequent but nonetheless quite frustrating.

Screenshot 2023-06-22 at 10 51 11

v1.0.0-alpha.50 doesn't work

I tried upgrading the logos-docusaurus-preset package to v1.0.0-alpha.50 and I got this error:

yarn run v1.22.19
warning ../../package.json: No license field
$ docusaurus start
[INFO] Starting the development server...
[ERROR] Error: Plugin "docusaurus-theme-mermaid" is used 2 times with ID "default".
To use the same plugin multiple times on a Docusaurus site, you need to assign a unique ID to each plugin instance.

The plugin ID is "default" by default. It's possible that the preset you are using already includes a plugin instance, in which case you either want to disable the plugin in the preset (to use a single instance), or assign another ID to your extra plugin instance (to use multiple instances).
    at /Users/lordghostx/Desktop/docs.waku.org/node_modules/@docusaurus/core/lib/server/plugins/pluginIds.js:23:23
    at Array.forEach (<anonymous>)
    at /Users/lordghostx/Desktop/docs.waku.org/node_modules/@docusaurus/core/lib/server/plugins/pluginIds.js:21:45
    at Array.forEach (<anonymous>)
    at ensureUniquePluginInstanceIds (/Users/lordghostx/Desktop/docs.waku.org/node_modules/@docusaurus/core/lib/server/plugins/pluginIds.js:19:35)
    at initPlugins (/Users/lordghostx/Desktop/docs.waku.org/node_modules/@docusaurus/core/lib/server/plugins/init.js:92:51)
    at async loadPlugins (/Users/lordghostx/Desktop/docs.waku.org/node_modules/@docusaurus/core/lib/server/plugins/index.js:26:21)
    at async load (/Users/lordghostx/Desktop/docs.waku.org/node_modules/@docusaurus/core/lib/server/index.js:76:58)
    at async Command.start (/Users/lordghostx/Desktop/docs.waku.org/node_modules/@docusaurus/core/lib/commands/start.js:44:19)
[INFO] Docusaurus version: 2.4.1
Node version: v20.3.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I've tried lower versions too (40 - 49), and I got the same error.

[Feedback] code blocks styling

Do you think we can make the code blocks more noticeable for users unfamiliar with the docs?

Screenshot 2023-06-19 at 12 55 32

https://waku-guide-git-add-nwaku-guides-logosdao.vercel.app/guides/nwaku/run-docker#get-docker-image

Screenshot 2023-06-19 at 12 56 49

https://waku-guide-git-add-nwaku-guides-logosdao.vercel.app/guides/nwaku/configure-discovery#configure-dns-discovery

Here are some suggestions:

  • Changing the font/code styling to a different theme
  • Adding a background color that's different from the page, examples: Vue, GitHub, MUI

Blog theme design enhancements

@nireims it would be nice to enhance the design for blog index page and blog post/articles as follow

  • Create a banner/hero section for /blog could be as simple as a headline (for example in case of vac it would be "Rlog - Vac Research Log" ) and ten a subtitle or description (for vac e.g; "Vac builds public good protocols for the decentralized web.")
  • Design a article header to distinguish it from the rest of content. This can be aligned with LPE but not necessary. This part should content title, subtitle if any, date and authors

example (not in terms of aesthetic) -> https://www.cloudquery.io/blog

CC @jinhojang6 & @jeangovil

Waku Template feedback

Look at staging branch of https://github.org/waku-org/waku.guide

  1. Discord invite link is incorrect

Discord invite link at the bottom of the page is prefixed by https://discordapp.com/users instead of https://discord.gg

  1. Missing "Waku" Logo/such title:

See top left corner. Feels empty/something missing. No Waku title and nothing happens when clicking on Waku Logo

image

  1. How to enable multi-language dropdown?

I want to start adding JavaScript doc to waku.guide, how do I proceed?

[Feedback Sidebar Dropdown]

An issue occurs with the styling of sidebar items with both a dropdown and a linked page. I'll show a comparison with the previous theme:

New theme: https://dev-docs.waku.org/overview/concepts/peer-discovery
Old theme: https://docs.waku.org/overview/concepts/peer-discovery

1. The page is not highlighted

The "Protocols" page is opened here, and there's a highlighting:

Screenshot 2023-06-15 at 04 40 35 Screenshot 2023-06-15 at 04 48 06

The "Peer Discovery" page is opened, but there is no highlighting:

Screenshot 2023-06-15 at 04 41 18 Screenshot 2023-06-15 at 04 48 42

2. Dropdowns with pages aren't collapsing

Screenshot 2023-06-15 at 04 41 18 Screenshot 2023-06-15 at 04 52 26

Try collapsing the dropdown of the "Peer Discovery" page using the arrow after opening it once.

3. Can we make the sidebar bigger?

There is a lot of space between the sidebar and the page. Can we increase the width of the sidebar so items are not cluttered?

Screenshot 2023-06-15 at 05 13 57

ASCII 3d model is cut of in some browsers

Waku visual is offset from the center, should be positioned slightly to the right to clip over the screen width.
The issue is not persistent. It happens sometimes on left side sometimes on right.

missing CSS effects

The most recent commits removed some CSS effects from the Waku Docs:

  1. There's a yt-video class on the videos on the /presentations page. Let's bring it back.
.yt-video {
    max-width: 100%;
    width: 640px;
    height: 360px;
}
  1. There's a GitHub icon in the navbar with the header-github-link class. Let's bring it back.

Before:
Screenshot 2023-06-09 at 03 20 44

Now:
Screenshot 2023-06-09 at 03 21 05

Here's the CSS:

.header-github-link:before {
    content: '';
    width: 24px;
    height: 24px;
    display: flex;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
    no-repeat;
}

html[data-theme='dark'] .header-github-link:before {
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
    no-repeat;
}

Auto-generate OpenGraph images

TODO:

  • Add support for docusaurus-plugin-content-docs
  • Add support for docusaurus-plugin-content-blog
  • Add support for docusaurus-plugin-content-pages
  • Implement image renderer for pages without images
  • Implement image renderer for pages with images

@nireims

  • Design for pages without images
  • Design for pages with images

Remove underline from in-active state of nav items in navbar

All items in nav bar regardless og their state show an under line! this should not be the case, underline should only be shown upon hover! not sure if this is a LSD config or not , but surely does not look good for the header and same for the dropdown menus. It should not show an underline.

Screenshot 2023-06-22 at 11 33 03

[Feedback Doc Theme] Licensing

Licensing on page is marked:

Waku © 2023
All rights reserved.

What are the guidelines for external contributors that wishes to contribute to the documentation or even to the website content (e.g. waku-org/waku.org#25)

Should we make them sign a CLA?

Should we keep a private licence on the doc repo? same questions for landing page.

Support for fathom JS

Some BUs require to inject fathom JS snipped to their client. It seems that we might nether to add some code or develop a plugin for it. Here is a relavant discussion.

atm, only Waku has asked but we need to make it scalable so parameters can be customized. Here is the sample script received from @serhanwbahar.

<!-- Fathom - simple website analytics - https://github.com/usefathom/fathom -->
<script>
(function(f, a, t, h, o, m){
    a[h]=a[h]||function(){
        (a[h].q=a[h].q||[]).push(arguments)
    };
    o=f.createElement('script'),
    m=f.getElementsByTagName('script')[0];
    o.async=1; o.src=t; o.id='fathom-script';
    m.parentNode.insertBefore(o,m)
})(document, window, '//fathom.status.im/tracker.js', 'fathom');
fathom('set', 'siteId', 'FUTMI');
fathom('trackPageview');
</script>
<!-- / Fathom -->

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.