Giter Club home page Giter Club logo

Comments (10)

RELNO avatar RELNO commented on June 23, 2024 1

Sounds good -- do you want to try and deploy to see if this can work? I'm under the assumption that master has to have only the "dirty" build, but I'll be happy to stand corrected.

from cityscope.github.io.

yasushisakai avatar yasushisakai commented on June 23, 2024 1

but, if we choose, we can always delete the src part in the master (or create a pre-commit) and just leave the doc folder. To clarify, the doc is the meat right? or is at the /root level?

I'll dig in.

from cityscope.github.io.

RELNO avatar RELNO commented on June 23, 2024 1

doc must stay in dev as it is being read from there to the frontend.

from cityscope.github.io.

RELNO avatar RELNO commented on June 23, 2024

@yasushisakai can you help with solving this niche issue https://dev.to/javascripterika/deploy-a-react-app-as-a-github-user-page-with-yarn-3fka
TLDR: on user page, there is no gh-pages option, but all has to be deployed from master. I don't know if this will make things weird.

from cityscope.github.io.

RELNO avatar RELNO commented on June 23, 2024

@yasushisakai any input on this? I can merge the pull but then will have to hold a SRC branch for the source, and the Master will be the build. It's not a pretty solution though

from cityscope.github.io.

yasushisakai avatar yasushisakai commented on June 23, 2024

Just breaking down the action points:

  1. merge the dev to master
  2. build inside master branch (in /docs?)
  3. commit & push master
  4. check the url

I'm not sure about the CNAME stuff but let's see how that turns out.

@RELNO missing anything?

from cityscope.github.io.

RELNO avatar RELNO commented on June 23, 2024

I'm not sure I understand 1.
If you merge Dev to master you just have both Dev and master holding the same data, no?
My understanding is that master should be only holding a built version (same as GH-pages in other repos)

from cityscope.github.io.

yasushisakai avatar yasushisakai commented on June 23, 2024

My thinking was master will show which version is actually being deployed, where the dev can be still be half baked and left for discussion.
Other than hurting your eyes, Git internally keeps only one copy of the file contents across branches, so duplicate things in master and dev won't hurt in terms of storage or performance.

from cityscope.github.io.

yasushisakai avatar yasushisakai commented on June 23, 2024

The basic idea of the site you mentioned earlier is the same for what I was thinking, but looking into her actual user.github.io repo:
https://github.com/JavaScriptErika
looks like her project lies at the repo root. Which is slightly different than our case having cityscope folder as the project root. Where does is the location of the md doc files relate to the built react app?

from cityscope.github.io.

RELNO avatar RELNO commented on June 23, 2024

I can move the content of cityscope to the root of dev but I don't think it's necessary since we're anyway building to another branch.
As for the docfolder -- they are statically linked by the md parser, so they could be anywhere, they are never being added as part of the build:

export default () => {
    const [content, setContent] = useState();
    const { contentUrl } = useContext(AppContext);
    const globalDocsURL =

// this is the static link
"https://raw.githubusercontent.com/CityScope/cityscope.github.io/dev/";

    const thisDocURL = globalDocsURL + contentUrl;

    useEffect(() => {
        axios
            .get(thisDocURL, {
                mode: "no-cors",
            })
            .then((response) => {
                setContent(response.data);
            });
    }, [thisDocURL]);

    return (
        <div className="result-pane">
            <ReactMarkdown
                className="result"
                source={content}
                transformImageUri={(uri) =>
                    uri.startsWith("http") ? uri : `${globalDocsURL}${uri}`
                }
            />
        </div>
    );
};

from cityscope.github.io.

Related Issues (20)

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.