Skip to content

Create a symbiflow-sphinx-docs-common repository #49

@mithro

Description

@mithro
Contributor

It feels like there is a lot of duplication between all the symbiflow (and some non-symbiflow repositories like the Fomu workshop) around getting a nice sphinx setup.

It would be good if there was a common repository that could be shared between everything. This could also be a good place to use git subtrees (rather than git submodules) to pull the module into the dependent repositories.

The repository should include;

We should also decide if we want to use m2r rather than the existing rather hacky https://github.com/SymbiFlow/sphinxcontrib-markdown-symlinks and recommonmark.

Activity

mithro

mithro commented on Apr 27, 2020

@mithro
ContributorAuthor
mithro

mithro commented on Apr 27, 2020

@mithro
ContributorAuthor

@xobs - You might also be interested in this....

mithro

mithro commented on Apr 27, 2020

@mithro
ContributorAuthor

This could help with #9

mithro

mithro commented on Apr 27, 2020

@mithro
ContributorAuthor

You can find the Fomu workshop at http://github.com/im-tomu/fomu-workshop

mithro

mithro commented on Apr 27, 2020

@mithro
ContributorAuthor
xobs

xobs commented on Apr 27, 2020

@xobs

For what it's worth, I didn't get satisfactory results out of recommonmark, but I think that's mostly because I found you can't mix both markdown and rst in the same file.

I switched to using m2r in lxsocdoc to allow per-section switching: https://github.com/enjoy-digital/litex/blob/master/litex/soc/doc/csr.py#L458-L467

Overall I'm reasonably happy with how well it's worked, though there definitely are a few things that you can express in markdown that can't be expressed in rst, mostly pertaining to tables (see https://github.com/miyakogi/m2r#restrictions). But it's a nice way to add support for people who are familiar with markdown and don't want to learn how to write rst.

GitHub
Build your hardware, easily! Contribute to enjoy-digital/litex development by creating an account on GitHub.
GitHub
Markdown to reStructuredText converter. Contribute to miyakogi/m2r development by creating an account on GitHub.
daniellimws

daniellimws commented on Apr 27, 2020

@daniellimws

I think we should use m2r if we want to use markdown files. I found it to be more flexible than the markdown symlinks and recommonmark. It can include md files into rst files, which those two cannot do. On the other hand, anything that those two can do, m2r can do by including the md file into a rst file.

daniellimws

daniellimws commented on Apr 27, 2020

@daniellimws

Oh we have 2 votes on m2r!

The current upstream version of m2r breaks with newer sphinx version due to changes in the api. I forked and applied a fix found at miyakogi/m2r#55 over here https://github.com/daniellimws/m2r.

I can transfer this repo to SymbiFlow for future maintenance.

GitHub
Markdown to reStructuredText converter. Contribute to daniellimws/m2r development by creating an account on GitHub.
mithro

mithro commented on Apr 27, 2020

@mithro
ContributorAuthor

If we convert the following repositories which are a big users of https://github.com/SymbiFlow/sphinxcontrib-markdown-symlinks then I think we can decide to use m2r.

We should also make sure that with m2r the links between markdown documents continue to work when included into the sphinx documentation, which is what the symlinks project was trying to do.

GitHub
Python library to solve markdown cross-reference links when building sphinx documentation - SymbiFlow/sphinxcontrib-markdown-symlinks
GitHub
Documenting the Xilinx 7-series bit-stream format. - SymbiFlow/prjxray
GitHub
Documentation for SymbiFlow. Contribute to SymbiFlow/symbiflow-docs development by creating an account on GitHub.
GitHub
Verilog to Routing -- Open Source CAD Flow for FPGA Research - verilog-to-routing/vtr-verilog-to-routing
mithro

mithro commented on May 8, 2020

@mithro
ContributorAuthor

It would be nice to also support linking to GitHub issues / commits / etc easily. Can we use https://github.com/sloria/sphinx-issues ?

GitHub
A Sphinx extension for linking to your project's issue tracker - sloria/sphinx-issues
eine

eine commented on Jun 5, 2020

@eine

It would be nice to also support linking to GitHub issues / commits / etc easily.

See https://github.com/ghdl/ghdl/blob/361f9e99e9f26ba8608621583efab6cf624ed2a8/doc/conf.py#L149-L156 and also https://github.com/ghdl/ghdl/blob/361f9e99e9f26ba8608621583efab6cf624ed2a8/doc/conf.py#L141-L147.

GitHub
VHDL 2008/93/87 simulator. Contribute to ghdl/ghdl development by creating an account on GitHub.
GitHub
VHDL 2008/93/87 simulator. Contribute to ghdl/ghdl development by creating an account on GitHub.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mithro@xobs@eine@daniellimws

        Issue actions

          Create a symbiflow-sphinx-docs-common repository · Issue #49 · f4pga/ideas