Giter Site home page Giter Site logo

eosnetworkfoundation / docsgen Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 4.43 MB

Scripts for creating docs.eosnetwork.com pulls from various eos nf repos and builds static HTML to power website

License: Other

JavaScript 46.86% Python 4.69% Shell 18.97% TypeScript 8.89% CSS 19.53% HTML 0.39% M4 0.67%

docsgen's People

Contributors

ericpassmore avatar iamveritas avatar lparisc avatar nsjames avatar skirianov avatar veg-ginna avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docsgen's Issues

Change Welcome to Docs

Rename welcome to docs. Two parts to this request

  • Update generate documents and and config for name change
  • Update github repository.

Suppress Old Release Notes

only github artifact release notes should show up, release notes stored with markdown should be removed

Testing Framework

Seems like we need a crawler.

Objectives

Write a crawler of devdocs portal to perform analysis per URL. Will not summarize analysis across URLs, will not dedup content across URLS

Initial Objectives

  • Broken Link checks (single page app all JS)
  • check content for each repo
  • harness should make testing to prevent regressions

Technology

use cypress , headless browser works everywhere

YAML metadata leaking into content

YAML Leaks into page

Title meta-data at top and it pushes down previous meta-data.

Investigate

The replacement of text might not work when there is more then just content-title.

Example

01_nodeos/05_rpc_apis/index.md

---
title: Rpc Apis
---
---
content_title: RPC APIs
link_text: RPC APIs
---

Test Each Repo is Rendered

Check for H1 tags in key repositories
Check to make sure code references exist for CDT and System Contracts

Links to functions in reference documentation need to be fixed urls

this is how a link to the function modify() in the mandel.cdt reference documentation gets generated:
http://localhost:8080/mandel-cdt/group__multiindex.html#ga4b3556ef69c7faa917f185ae33a34442

the anchor seems to be a GUID which will be different each time the doc gets generated
we need these anchors to be fixed so we can use them in docs and link to functions reference documentation.

Later edit:
the GUIDs are generated the same way (fixed) all the time but we could improve

  1. the double underscores could be simplified
  2. instead of GUIDs have integers?... or a human readable anchor

Fix Title and Nav for Resource Directory

in CDT and EOS System Contract the doxygen/doxybook2 files fall into a resource directory fix by doing the following

  • Prefix with number 90_ to drop to bottom of index
  • Capitalize Title
  • Make a proper index if needed

Tracking & Privacy Requirments

Starting an issue so we don't forget this work item. Need to know how to implement tracking, marketing tags, and any special features to support EU/CA privacy requirements.

Duplicate titles in sidebar

Sometimes markdown file can have the same name

  1. eosjs module directory and eosjs module markdown file.
  2. system-contracts has two about system contracts

Always Working Reference Links

Example:
/action-reference/eosio.bios -> /reference/mandel-contracts/classeosiobios_1_1bios.html

Put this mapping in one location, may need to correctly handle release or API versions

Update Crawler to use sitemap

NOTE alternative is to use algoria crawler.

Edit crawler/getLinks.js to crawl https://docs.eosnetwork.com/sitemap.xml

Mostly likely want to crawl in groups by first level directory. For example param of group=cdt would crawl

  • /zh/cdt
  • /ko/cdt
  • /cd

Filter out all /blog do not crawl those
Mostly likely want to crawl latest stable release, so you may need a version param as well.

Having our own crawler is faster and cheaper, but fragile.

Add Tags for GitHub Origin

Add front matter YAML to documents at build time. Include

  • github repo
  • path to file on github
  • github branch or tag

Documentation staging site

The DevRel team needs a new hostname like docs-staging or similar on the eosnetwork.com domain to run the docs build scripts. This is needed so they can inspect the docs and make sure they render correctly prior to publishing on docs.eosnetwork.com.

Daily Staging builds

Requirements

  • configurable devdoc branch
  • creates update file
  • cron for daily 4am ET

H1 tags link in document navigation

Seems like anchor tags are not generated for heading level 1 (#) in rendered markdown files. This also affects page navigation since first section titles/links are missing. Not sure whether filing this as a bug, enhancement, or neither. Seems like docusaurus is adhering to the unofficial rule that 1st headings are used for page title, while 2nd/3rd+ headings used for actual section titles. If we also adhere to this, then we need to update all docs and convert # โ€”> ##, ## โ€”> ###, etc. Thoughts? @ericpassmore

Run build documents by default

for generate_documents.sh run npm run build by default. Add -x as suppression flag to prevent running build. Suppression of build is needed when running several generation processes back to back. You only want to run on the last build

Remove restrictions on Welcome install

Currently only the following directories (plus the glossary) are copied from the welcome repo when building the document portal. Need to remove these restrictions and copy over all directories.

  • 01_overview
  • 02_getting-started
  • 03_tutorials
  • 04_protocol
  • 05_community-developer-tools
  • 06_eosio-blockchain-networks
  • 07_migration-guides resources

Move Search box to Sidebar

Steps

  • Swizzle search box
    • This creates js file under your project
    • restart dev server
  • edit sidebar.js to include newly swizzled file
  • search box should now be in sidebar

Question: how do we remove from NavBar or does the act of swizzling remove it?
Question: does the swizzled search box have DOM structure or just behaviors? Do we need HTML/CSS styling

Swizzling will also allow you to replace search box with other options like algolia if you like

Support for Info and Warning labels/tags

We need support for these custom markups below:

[[info | Implementation location]]
[[warning | Implementation location]]
[[caution | Implementation location]]
[[danger | Implementation location]]

When they are present in an md file the text should render differently (color and background) for each of them.

Consistant UI/UX for external links

Need to scope work covering the content in references

  • open API docs
  • swift docs
  • java docs
  • doxygen docs for C/C++ code
    • mandel
    • mandel-contracts
    • mandel-cdt

Restructure code by repository

Needed to align repo PR and release with documentation update. Going forward github scripts will generate and pull docs on a new release. github scripts work on a repository level so code must align to repos

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.